diff options
author | Vadim Rozenfeld <vrozenfe@redhat.com> | 2014-01-24 00:40:48 +1100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-03 17:33:55 +0100 |
commit | 5ef68987e5671edf5f51f845d1bbf3e5759a8526 (patch) | |
tree | be0504035a9595a9bd0caf382a1c52568a16873e /target-i386/kvm.c | |
parent | 1c90ef2619dd6e5c4fec7e9e18c04c0a08e93aac (diff) | |
download | qemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.zip qemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.tar.gz qemu-5ef68987e5671edf5f51f845d1bbf3e5759a8526.tar.bz2 |
kvm: make hyperv vapic assist page migratable
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r-- | target-i386/kvm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index fade2c9..ddd437f 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1236,7 +1236,8 @@ static int kvm_put_msrs(X86CPU *cpu, int level) env->msr_hv_hypercall); } if (has_msr_hv_vapic) { - kvm_msr_entry_set(&msrs[n++], HV_X64_MSR_APIC_ASSIST_PAGE, 0); + kvm_msr_entry_set(&msrs[n++], HV_X64_MSR_APIC_ASSIST_PAGE, + env->msr_hv_vapic); } /* Note: MSR_IA32_FEATURE_CONTROL is written separately, see @@ -1526,6 +1527,10 @@ static int kvm_get_msrs(X86CPU *cpu) msrs[n++].index = HV_X64_MSR_HYPERCALL; msrs[n++].index = HV_X64_MSR_GUEST_OS_ID; } + if (has_msr_hv_vapic) { + msrs[n++].index = HV_X64_MSR_APIC_ASSIST_PAGE; + } + msr_data.info.nmsrs = n; ret = kvm_vcpu_ioctl(CPU(cpu), KVM_GET_MSRS, &msr_data); if (ret < 0) { @@ -1639,6 +1644,9 @@ static int kvm_get_msrs(X86CPU *cpu) case HV_X64_MSR_GUEST_OS_ID: env->msr_hv_guest_os_id = msrs[i].data; break; + case HV_X64_MSR_APIC_ASSIST_PAGE: + env->msr_hv_vapic = msrs[i].data; + break; } } |