diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2014-05-09 10:06:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-05-13 13:11:08 +0200 |
commit | ada4135f84adcacd9294269e22113460650ae1ab (patch) | |
tree | 5ed60670851fc64b5c8762fbfb9b9056dacfb615 /target-s390x/kvm.c | |
parent | 8e03c100a7aeb268a7ebfdd98298591a63df0626 (diff) |
kvm: make one_reg helpers available for everyone
s390x introduced helper functions for getting/setting one_regs with
commit 860643bc. However, nothing about these is s390-specific.
Alexey Kardashevskiy had already posted a general version, so let's
merge the two patches and massage the code a bit.
CC: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-s390x/kvm.c')
-rw-r--r-- | target-s390x/kvm.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index b7b0edc4f1..ba2dffe3dd 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -129,35 +129,6 @@ void kvm_arch_reset_vcpu(CPUState *cpu) } } -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); |