diff options
Diffstat (limited to 'target-s390x/kvm.c')
-rw-r--r-- | target-s390x/kvm.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index b7b0edc4f1..56179afece 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -117,47 +117,20 @@ int kvm_arch_init_vcpu(CPUState *cpu) return 0; } -void kvm_arch_reset_vcpu(CPUState *cpu) +void kvm_s390_reset_vcpu(S390CPU *cpu) { + CPUState *cs = CPU(cpu); + /* The initial reset call is needed here to reset in-kernel * vcpu data that we can't access directly from QEMU * (i.e. with older kernels which don't support sync_regs/ONE_REG). * Before this ioctl cpu_synchronize_state() is called in common kvm * code (kvm-all) */ - if (kvm_vcpu_ioctl(cpu, KVM_S390_INITIAL_RESET, NULL)) { + if (kvm_vcpu_ioctl(cs, KVM_S390_INITIAL_RESET, NULL)) { perror("Can't reset vcpu\n"); } } -static int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source) -{ - struct kvm_one_reg reg; - int r; - - reg.id = id; - reg.addr = (uint64_t) source; - r = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); - if (r) { - trace_kvm_failed_reg_set(id, strerror(errno)); - } - return r; -} - -static int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target) -{ - struct kvm_one_reg reg; - int r; - - reg.id = id; - reg.addr = (uint64_t) target; - r = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); - if (r) { - trace_kvm_failed_reg_get(id, strerror(errno)); - } - return r; -} - - int kvm_arch_put_registers(CPUState *cs, int level) { S390CPU *cpu = S390_CPU(cs); |