From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: BUG with Win7 and user-return-notifier Date: Thu, 29 Oct 2009 18:49:03 +0200 Message-ID: <4AE9C77F.8010604@redhat.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> <4AE9BDD1.3050001@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3923 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755326AbZJ2QtH (ORCPT ); Thu, 29 Oct 2009 12:49:07 -0400 In-Reply-To: <4AE9BDD1.3050001@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/29/2009 06:07 PM, Jan Kiszka wrote: > > Question: When a VCPU migrates, what syncs the shared_msrs per-cpu vars > before or after that, or why is this no problem? > > The guest's msrs remain on the old cpu (until a new guest is switched in or we return to userspace). The guest msrs are loaded into the new cpu when vmx_save_host_state() is called as part or kvm_arch_vcpu_load(). > 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. > That's a global... -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.