From patchwork Mon Mar 23 19:25:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 13813 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 n2NJPNaL028824 for ; Mon, 23 Mar 2009 19:25:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758145AbZCWTZV (ORCPT ); Mon, 23 Mar 2009 15:25:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755991AbZCWTZV (ORCPT ); Mon, 23 Mar 2009 15:25:21 -0400 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 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2NJPDb0030433; Mon, 23 Mar 2009 15:25:14 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2NJP8XN001263; Mon, 23 Mar 2009 15:25:08 -0400 Received: from mermaid.qumranet.com (vpn-13-127.rdu.redhat.com [10.11.13.127]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2NJP28H008513; Mon, 23 Mar 2009 15:25:11 -0400 Message-ID: <49C7E236.90902@redhat.com> Date: Mon, 23 Mar 2009 21:25:42 +0200 From: Avi Kivity User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Benjamin Gilbert CC: kvm@vger.kernel.org Subject: Re: Kernel GPF in vmx_save_host_state() 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> In-Reply-To: <49C7D7F4.7090204@cs.cmu.edu> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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. 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;