From patchwork Mon Jun 22 22:20:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 31879 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 n5MMHOME024871 for ; Mon, 22 Jun 2009 22:17:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbZFVWRT (ORCPT ); Mon, 22 Jun 2009 18:17:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751277AbZFVWRT (ORCPT ); Mon, 22 Jun 2009 18:17:19 -0400 Received: from outbound-dub.frontbridge.com ([213.199.154.16]:40258 "EHLO IE1EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751240AbZFVWRT (ORCPT ); Mon, 22 Jun 2009 18:17:19 -0400 Received: from mail40-dub-R.bigfish.com (10.5.252.3) by IE1EHSOBE003.bigfish.com (10.5.252.23) with Microsoft SMTP Server id 8.1.340.0; Mon, 22 Jun 2009 22:17:21 +0000 Received: from mail40-dub (localhost.localdomain [127.0.0.1]) by mail40-dub-R.bigfish.com (Postfix) with ESMTP id 3BCE86901BE; Mon, 22 Jun 2009 22:17:21 +0000 (UTC) X-SpamScore: 18 X-BigFish: VPS18(z39eeh297cih3ea6izzz1202hzzz32i17ch62h) X-Spam-TCS-SCL: 1:0 Received: by mail40-dub (MessageSwitch) id 1245709040987866_9552; Mon, 22 Jun 2009 22:17:20 +0000 (UCT) Received: from ausb3extmailp02.amd.com (ausb3extmailp02.amd.com [163.181.251.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail40-dub.bigfish.com (Postfix) with ESMTP id 827342C8057; Mon, 22 Jun 2009 22:17:20 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n5MMHFmD024333; Mon, 22 Jun 2009 17:17:18 -0500 X-WSS-ID: 0KLNV8D-02-WK1-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 275341234026; Mon, 22 Jun 2009 17:17:01 -0500 (CDT) Received: from SAUSEXMB3.amd.com ([163.181.22.202]) by sausexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Jun 2009 17:17:14 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by SAUSEXMB3.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Jun 2009 17:17:13 -0500 Received: from localhost.localdomain ([165.204.15.42]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Jun 2009 00:16:56 +0200 From: Andre Przywara To: avi@redhat.com CC: kvm@vger.kernel.org, Andre Przywara Subject: [PATCH 2/2] ignore reads from AMDs C1E enabled MSR Date: Tue, 23 Jun 2009 00:20:44 +0200 Message-ID: <1245709244-1000-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.1.3 X-OriginalArrivalTime: 22 Jun 2009 22:16:56.0752 (UTC) FILETIME=[279D3B00:01C9F387] 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 4c19c24..670a96d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1000,6 +1000,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: