From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: BUG with Win7 and user-return-notifier Date: Thu, 29 Oct 2009 17:07:45 +0100 Message-ID: <4AE9BDD1.3050001@siemens.com> References: <4AE6ED18.9040901@siemens.com> <4AE6F17C.1070403@redhat.com> <4AE6F1EE.5090207@siemens.com> <4AE6F4A3.3050903@redhat.com> <4AE6F4C4.3000802@redhat.com> <4AE7FE3B.2070802@redhat.com> <4AE84EB4.1010603@siemens.com> <4AE86AA0.1060802@redhat.com> <4AE8AC20.50506@web.de> <4AE9462E.5050409@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Avi Kivity Return-path: Received: from thoth.sbs.de ([192.35.17.2]:18667 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753514AbZJ2QHz (ORCPT ); Thu, 29 Oct 2009 12:07:55 -0400 In-Reply-To: <4AE9462E.5050409@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > On 10/28/2009 10:40 PM, Jan Kiszka wrote: >> >>> [you can get longer, more detailed traces by using >>> /sys/kernel/debug/tracing/trace instead of dmesg] >>> >>> Oct 28 14:29:56 mchn012c kernel: qemu-sys-7200 0...1. 676996395us : >>> kvm_msr: msr_read c0000080 = 0x500 >>> Oct 28 14:29:56 mchn012c kernel: qemu-sys-7200 0...1. 676996403us : >>> kvm_msr: msr_write c0000080 = 0xd01 >>> >>> So Windows is setting EFER.SCE and EFER.NX while in long mode - >>> perfectly reasonable. Can you rerun with the attached debug patch? >>> >>> >> Log attached. >> > > So the last bits are: > > Oct 28 21:26:41 mchn012c kernel: update_transition_efer: efer_offset 4 > efer d01 > Oct 28 21:26:41 mchn012c kernel: update_transition_efer: ignoring all bits > Oct 28 21:26:41 mchn012c kernel: setup_msrs: marking efer for no reload > > We're not reloading efer (correctly, as guest efer == host efer), yet > vmx_save_host_state() fails while loading efer. I've looked at > move_msr_up() (which is used by setup_msrs() to partition the msr space > into reloaded and non-reloaded msrs), and it seems correct. > > Can you see any way where update_transition_efer() returns false, yet > efer turns up in the first save_nmsrs entries of vmx->guest_msrs? > Question: When a VCPU migrates, what syncs the shared_msrs per-cpu vars before or after that, or why is this no problem? I'm currently following the theory that guest_msrs contains some non-EFER entry with 0 value, but shared_msrs has a different index in the slot passed to kvm_set_shared_msr. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux