[PATCH] KVM: x86: Add three MSRs to the list of ignored MSRs

Shuai Ruan
2016-04-14T09:27:41Z

When passthrough the Intel GPU Device (igd) to windows guest,
the idg driver of the guest will read three MSRs:

MSR_NHM_TURBO_RATIO_LIMIT
MSR_PLATFORM_INFO
MSR_PKG_POWER_LIMIT

Windows guest os will crash as kvm will inject a #GP into the guest
if that tries to access unhandled MSRs, so add this three MSRS to
the list of ignored MSRs.

Signed-off-by: Shuai Ruan <shuai.ruan@linux.intel.com>
---
arch/x86/kvm/x86.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9b7798c..f00a58e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2301,6 +2301,9 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
case MSR_IA32_LASTBRANCHTOIP:
case MSR_IA32_LASTINTFROMIP:
case MSR_IA32_LASTINTTOIP:
+ case MSR_NHM_TURBO_RATIO_LIMIT:
+ case MSR_PLATFORM_INFO:
+ case MSR_PKG_POWER_LIMIT:
case MSR_K8_SYSCFG:
case MSR_K8_TSEG_ADDR:
case MSR_K8_TSEG_MASK:
--
1.9.1