diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2010-01-27 20:44:01 -0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-01-31 19:20:09 -0200 |
commit | ae5ae0d52085d9f16216741c27736cf8fbdfe22d (patch) | |
tree | 92619b7d1b89b229a486e82f4d74b39ea6c6ac2b /target-i386/machine.c | |
parent | Fix kvm_load_mpstate for vcpu hot add (diff) | |
download | qemu-kvm-ae5ae0d52085d9f16216741c27736cf8fbdfe22d.tar.gz qemu-kvm-ae5ae0d52085d9f16216741c27736cf8fbdfe22d.tar.bz2 qemu-kvm-ae5ae0d52085d9f16216741c27736cf8fbdfe22d.zip |
qemu-kvm: enable get/set vcpu events on reset and migration
qemu-kvm should reset and save/restore vcpu events.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r-- | target-i386/machine.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c index 47ca6e856..0b8a33afd 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -323,7 +323,10 @@ static void cpu_pre_save(void *opaque) int i; cpu_synchronize_state(env); - kvm_save_mpstate(env); + if (kvm_enabled()) { + kvm_save_mpstate(env); + kvm_get_vcpu_events(env); + } /* FPU */ env->fpus_vmstate = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; @@ -374,6 +377,7 @@ static int cpu_post_load(void *opaque, int version_id) kvm_load_tsc(env); kvm_load_mpstate(env); + kvm_put_vcpu_events(env); } return 0; |