]> git.proxmox.com Git - pve-kernel-jessie.git/blame - 0001-KVM-VMX-Fix-host-initiated-access-to-guest-MSR_TSC_A.patch
buildsys: delete /lib/modules/KERNEL/build
[pve-kernel-jessie.git] / 0001-KVM-VMX-Fix-host-initiated-access-to-guest-MSR_TSC_A.patch
CommitLineData
f63e0b72
TL
1From 81b1b9ca6d5ca5f3ce91c0095402def657cf5db3 Mon Sep 17 00:00:00 2001
2From: Haozhong Zhang <haozhong.zhang@intel.com>
3Date: Mon, 14 Dec 2015 23:13:38 +0800
4Subject: [PATCH] KVM: VMX: Fix host initiated access to guest MSR_TSC_AUX
5
6commit 81b1b9ca6d5ca5f3ce91c0095402def657cf5db3 upstream.
7
8The current handling of accesses to guest MSR_TSC_AUX returns error if
9vcpu does not support rdtscp, though those accesses are initiated by
10host. This can result in the reboot failure of some versions of
11QEMU. This patch fixes this issue by passing those host initiated
12accesses for further handling instead.
13
14Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
15Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
16Backported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17---
18 arch/x86/kvm/vmx.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
22index 6b56056..44976a5 100644
23--- a/arch/x86/kvm/vmx.c
24+++ b/arch/x86/kvm/vmx.c
25@@ -2673,7 +2673,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
26 msr_info->data = vcpu->arch.ia32_xss;
27 break;
28 case MSR_TSC_AUX:
29- if (!to_vmx(vcpu)->rdtscp_enabled)
30+ if (!to_vmx(vcpu)->rdtscp_enabled && !msr_info->host_initiated)
31 return 1;
32 /* Otherwise falls through */
33 default:
34@@ -2779,7 +2779,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
35 clear_atomic_switch_msr(vmx, MSR_IA32_XSS);
36 break;
37 case MSR_TSC_AUX:
38- if (!vmx->rdtscp_enabled)
39+ if (!vmx->rdtscp_enabled && !msr_info->host_initiated)
40 return 1;
41 /* Check reserved bit, higher 32 bits should be zero */
42 if ((data >> 32) != 0)
43--
442.1.4
45