From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Kernel GPF in vmx_save_host_state() Date: Mon, 23 Mar 2009 21:25:42 +0200 Message-ID: <49C7E236.90902@redhat.com> References: <49C0313C.5010906@cs.cmu.edu> <49C0B702.1060807@redhat.com> <49C12ED2.4080209@cs.cmu.edu> <49C20ED4.2040700@redhat.com> <49C2B289.7030707@cs.cmu.edu> <49C60011.8030405@redhat.com> <49C7D3D8.3060508@cs.cmu.edu> <49C7D63E.8070707@redhat.com> <49C7D7F4.7090204@cs.cmu.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000509000002010009050107" Cc: kvm@vger.kernel.org To: Benjamin Gilbert Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40599 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756692AbZCWTZU (ORCPT ); Mon, 23 Mar 2009 15:25:20 -0400 In-Reply-To: <49C7D7F4.7090204@cs.cmu.edu> Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------000509000002010009050107 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Benjamin Gilbert wrote: >>> vmx_set_msr: msr_index 0xc0000080 msr->index 0xc0000080 msr->data 0x100 >> >> How did that get in there?! >> >> Please add a dump_stack() after that printk(). > > Pid: 2381, comm: qemu-system-x86 Not tainted 2.6.28-686 #4 > Call Trace: > [] vmx_set_msr+0x150/0x178 [kvm_intel] > [] handle_wrmsr+0x71/0x9d [kvm_intel] Duh, I noted this hole in a previous email. Attached patch should fix. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. --------------000509000002010009050107 Content-Type: text/x-patch; name="dont-allow-uninhibited-efer-access-on-i386.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dont-allow-uninhibited-efer-access-on-i386.patch" diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 88ef094..da6461d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -942,11 +942,11 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) int ret = 0; switch (msr_index) { -#ifdef CONFIG_X86_64 case MSR_EFER: vmx_load_host_state(vmx); ret = kvm_set_msr_common(vcpu, msr_index, data); break; +#ifdef CONFIG_X86_64 case MSR_FS_BASE: vmcs_writel(GUEST_FS_BASE, data); break; --------------000509000002010009050107--