All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuai Ruan <shuai.ruan@linux.intel.com>
To: pbonzini@redhat.com, rkrcmar@redhat.com
Cc: kvm@vger.kernel.org, allen.m.kay@intel.com
Subject: [PATCH] KVM: x86: Add three MSRs to the list of ignored MSRs
Date: Thu, 14 Apr 2016 17:28:29 +0800	[thread overview]
Message-ID: <1460626109-24343-1-git-send-email-shuai.ruan@linux.intel.com> (raw)

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


             reply	other threads:[~2016-04-14  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  9:28 Shuai Ruan [this message]
2016-04-14 13:33 ` [PATCH] KVM: x86: Add three MSRs to the list of ignored MSRs Radim Krčmář
2016-04-14 14:42   ` Paolo Bonzini
2016-04-14 16:29     ` Radim Krčmář
2016-04-15 10:48       ` Paolo Bonzini
2016-04-15 14:12         ` Radim Krčmář
     [not found]           ` <20160419092025.GA2651@shuai.ruan@linux.intel.com>
2016-04-19 16:10             ` Kay, Allen M

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460626109-24343-1-git-send-email-shuai.ruan@linux.intel.com \
    --to=shuai.ruan@linux.intel.com \
    --cc=allen.m.kay@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.