From patchwork Thu Apr 14 09:28:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuai Ruan X-Patchwork-Id: 8833021 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E48999F3D1 for ; Thu, 14 Apr 2016 09:27:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A559202F2 for ; Thu, 14 Apr 2016 09:27:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4160F20145 for ; Thu, 14 Apr 2016 09:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754305AbcDNJ1m (ORCPT ); Thu, 14 Apr 2016 05:27:42 -0400 Received: from mga14.intel.com ([192.55.52.115]:45511 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754292AbcDNJ1l (ORCPT ); Thu, 14 Apr 2016 05:27:41 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 14 Apr 2016 02:27:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,484,1455004800"; d="scan'208";a="932240995" Received: from rs-vmm.bj.intel.com ([10.238.135.53]) by orsmga001.jf.intel.com with ESMTP; 14 Apr 2016 02:25:48 -0700 From: Shuai Ruan 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 Message-Id: <1460626109-24343-1-git-send-email-shuai.ruan@linux.intel.com> X-Mailer: git-send-email 1.9.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: