diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2009-11-09 21:05:37 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-11-12 11:23:55 -0600 |
commit | 9bdbe550f06ac8a2aa0a3fc999d86bc092918b0a (patch) | |
tree | 19b49b405da976205563c274f76cef806900c920 /target-i386 | |
parent | virtio-blk: Pass read errors to the guest (diff) | |
download | qemu-kvm-9bdbe550f06ac8a2aa0a3fc999d86bc092918b0a.tar.gz qemu-kvm-9bdbe550f06ac8a2aa0a3fc999d86bc092918b0a.tar.bz2 qemu-kvm-9bdbe550f06ac8a2aa0a3fc999d86bc092918b0a.zip |
kvm: Move KVM mp_state accessors to i386-specific code
Unbreaks PowerPC and S390 KVM builds.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 701099921..6613a3f18 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -659,6 +659,26 @@ static int kvm_get_msrs(CPUState *env) return 0; } +static int kvm_put_mp_state(CPUState *env) +{ + struct kvm_mp_state mp_state = { .mp_state = env->mp_state }; + + return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state); +} + +static int kvm_get_mp_state(CPUState *env) +{ + struct kvm_mp_state mp_state; + int ret; + + ret = kvm_vcpu_ioctl(env, KVM_GET_MP_STATE, &mp_state); + if (ret < 0) { + return ret; + } + env->mp_state = mp_state.mp_state; + return 0; +} + int kvm_arch_put_registers(CPUState *env) { int ret; |