From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: [PATCH] Ignore DEBUGCTL MSRs Date: Tue, 24 Jun 2008 07:04:45 +0200 Message-ID: <4860806D.6000608@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060705070304000906000201" Cc: joerg.roedel@amd.com To: kvm@vger.kernel.org Return-path: Received: from mail.suse.de ([195.135.220.2]:37956 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbYFXFHE (ORCPT ); Tue, 24 Jun 2008 01:07:04 -0400 Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------060705070304000906000201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Netware writes and reads to the DEBUGCTL and LAST*IP MSRs without further checks and is really confused to receive a #GP during that. To make it happy we should just make them stubs, which is exactly what SVM already does. To support VMX too, I put these in the generic code. Maybe the SVM code could be cleaned up to use generic code too. Signed-off-by: Alexander Graf --------------060705070304000906000201 Content-Type: text/x-patch; name="kvm-netware.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kvm-netware.patch" diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fc0721e..02f8490 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -609,6 +609,11 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) pr_unimpl(vcpu, "%s: MSR_IA32_MCG_CTL 0x%llx, nop\n", __func__, data); break; + case MSR_IA32_DEBUGCTLMSR: + case MSR_IA32_LASTBRANCHFROMIP: + case MSR_IA32_LASTBRANCHTOIP: + case MSR_IA32_LASTINTFROMIP: + case MSR_IA32_LASTINTTOIP: case MSR_IA32_UCODE_REV: case MSR_IA32_UCODE_WRITE: break; @@ -705,6 +710,11 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) case MSR_IA32_MC0_MISC+16: case MSR_IA32_UCODE_REV: case MSR_IA32_EBL_CR_POWERON: + case MSR_IA32_DEBUGCTLMSR: + case MSR_IA32_LASTBRANCHFROMIP: + case MSR_IA32_LASTBRANCHTOIP: + case MSR_IA32_LASTINTFROMIP: + case MSR_IA32_LASTINTTOIP: data = 0; break; case MSR_MTRRcap: --------------060705070304000906000201--