From patchwork Wed Oct 28 16:00:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 56313 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 n9SG1kEw014168 for ; Wed, 28 Oct 2009 16:01:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754762AbZJ1QAg (ORCPT ); Wed, 28 Oct 2009 12:00:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754888AbZJ1QAf (ORCPT ); Wed, 28 Oct 2009 12:00:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52194 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754846AbZJ1QAe (ORCPT ); Wed, 28 Oct 2009 12:00:34 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9SG0ZPn025091; Wed, 28 Oct 2009 12:00:35 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9SG0XeH014309; Wed, 28 Oct 2009 12:00:34 -0400 Received: from balrog.qumranet.com (dhcp-1-197.tlv.redhat.com [10.35.1.197]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 6B42025004A; Wed, 28 Oct 2009 18:00:32 +0200 (IST) Message-ID: <4AE86AA0.1060802@redhat.com> Date: Wed, 28 Oct 2009 18:00:32 +0200 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: Jan Kiszka CC: kvm Subject: Re: BUG with Win7 and user-return-notifier 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> In-Reply-To: <4AE84EB4.1010603@siemens.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 85f97d1..6bd6d2c 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -590,6 +590,8 @@ static bool update_transition_efer(struct vcpu_vmx *vmx) u64 guest_efer; u64 ignore_bits; + printk("%s: efer_offset %d efer %llx\n", + __func__, efer_offset, vmx->vcpu.arch.shadow_efer); if (efer_offset < 0) return false; guest_efer = vmx->vcpu.arch.shadow_efer; @@ -606,10 +608,11 @@ static bool update_transition_efer(struct vcpu_vmx *vmx) ignore_bits &= ~(u64)EFER_SCE; #endif if ((guest_efer & ~ignore_bits) == (host_efer & ~ignore_bits)) - return false; + return printk("%s: ignoring all bits\n", __func__), false; guest_efer &= ~ignore_bits; guest_efer |= host_efer & ignore_bits; + printk("%s: transition efer %llx\n", __func__, guest_efer); vmx->guest_msrs[efer_offset].data = guest_efer; return true; } @@ -928,8 +931,11 @@ static void setup_msrs(struct vcpu_vmx *vmx) } #endif vmx->msr_offset_efer = index = __find_msr_index(vmx, MSR_EFER); - if (index >= 0 && update_transition_efer(vmx)) + if (index >= 0 && update_transition_efer(vmx)) { + printk("%s: marking efer for reload\n", __func__); move_msr_up(vmx, index, save_nmsrs++); + } else + printk("%s: marking efer for no reload\n", __func__); vmx->save_nmsrs = save_nmsrs;