From patchwork Wed Jun 24 10:44:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 32141 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5OAfESd014319 for ; Wed, 24 Jun 2009 10:41:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbZFXKlH (ORCPT ); Wed, 24 Jun 2009 06:41:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751515AbZFXKlG (ORCPT ); Wed, 24 Jun 2009 06:41:06 -0400 Received: from wa4ehsobe005.messaging.microsoft.com ([216.32.181.15]:53555 "EHLO WA4EHSOBE005.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750957AbZFXKlF (ORCPT ); Wed, 24 Jun 2009 06:41:05 -0400 Received: from mail148-wa4-R.bigfish.com (10.8.14.240) by WA4EHSOBE005.bigfish.com (10.8.40.25) with Microsoft SMTP Server id 8.1.340.0; Wed, 24 Jun 2009 10:41:06 +0000 Received: from mail148-wa4 (localhost.localdomain [127.0.0.1]) by mail148-wa4-R.bigfish.com (Postfix) with ESMTP id 030FD11301D5; Wed, 24 Jun 2009 10:41:07 +0000 (UTC) X-SpamScore: 20 X-BigFish: VPS20(z39eeh297cih3ea6izzz1202hzzz32i17ch43j62h) X-Spam-TCS-SCL: 1:0 Received: by mail148-wa4 (MessageSwitch) id 1245840065739390_31078; Wed, 24 Jun 2009 10:41:05 +0000 (UCT) Received: from ausb3extmailp01.amd.com (unknown [163.181.251.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail148-wa4.bigfish.com (Postfix) with ESMTP id 6C9341005B; Wed, 24 Jun 2009 10:41:05 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n5OAewVw015082; Wed, 24 Jun 2009 05:41:01 -0500 X-WSS-ID: 0KLQOC7-02-W5M-01 Received: from sausexbh1.amd.com (sausexbh1.amd.com [163.181.22.101]) by ausb3twp02.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 2D04E1234026; Wed, 24 Jun 2009 05:40:54 -0500 (CDT) Received: from SAUSEXMB3.amd.com ([163.181.22.202]) by sausexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Jun 2009 05:40:59 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by SAUSEXMB3.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Jun 2009 05:40:58 -0500 Received: from localhost.localdomain ([165.204.15.42]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Jun 2009 12:40:45 +0200 From: Andre Przywara To: avi@redhat.com CC: kvm@vger.kernel.org, Andre Przywara Subject: [PATCH 2/4] ignore reads from AMDs C1E enabled MSR Date: Wed, 24 Jun 2009 12:44:34 +0200 Message-ID: <1245840276-12702-2-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1245840276-12702-1-git-send-email-andre.przywara@amd.com> References: <1245840276-12702-1-git-send-email-andre.przywara@amd.com> X-OriginalArrivalTime: 24 Jun 2009 10:40:45.0055 (UTC) FILETIME=[3A9198F0:01C9F4B8] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org If the Linux kernel detects an C1E capable AMD processor (K8 RevF and higher), it will access a certain MSR on every attempt to go to halt. Explicitly handle this read and return 0 to let KVM run a Linux guest with the native AMD host CPU propagated to the guest. Signed-off-by: Andre Przywara --- arch/x86/kvm/x86.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c5a0d37..a148f4c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1001,6 +1001,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) case MSR_P6_EVNTSEL0: case MSR_P6_EVNTSEL1: case MSR_K7_EVNTSEL0: + case MSR_K8_INT_PENDING_MSG: data = 0; break; case MSR_MTRRcap: