From 3593e6b592067d4a9a0131deedbe2581a9763548 Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Thu, 3 Feb 2011 06:57:46 -0200 Subject: [PATCH] qemu-kvm-x86: initialize has_msr_star/has_msr_hsave_pa Fixes 64-bit guest migration. Signed-off-by: Marcelo Tosatti --- qemu-kvm-x86.c | 6 ++++++ target-i386/kvm.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 2f1a0909bf..4be5e329e9 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -509,6 +509,12 @@ int kvm_arch_qemu_create_context(void) kvm_set_shadow_pages(kvm_context, kvm_shadow_memory); } + /* initialize has_msr_star/has_msr_hsave_pa */ + r = kvm_get_supported_msrs(kvm_state); + if (r < 0) { + return r; + } + kvm_msr_list = kvm_get_msr_list(); if (!kvm_msr_list) { return -1; diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5e0865a832..f389b85b15 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -472,7 +472,6 @@ void kvm_arch_reset_vcpu(CPUState *env) } } -#ifdef OBSOLETE_KVM_IMPL static int kvm_get_supported_msrs(KVMState *s) { @@ -521,6 +520,8 @@ static int kvm_get_supported_msrs(KVMState *s) return ret; } +#ifdef OBSOLETE_KVM_IMPL + int kvm_arch_init(KVMState *s) { uint64_t identity_base = 0xfffbc000; -- 2.11.4.GIT