public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: BUG with Win7 and user-return-notifier
Date: Wed, 28 Oct 2009 18:00:32 +0200	[thread overview]
Message-ID: <4AE86AA0.1060802@redhat.com> (raw)
In-Reply-To: <4AE84EB4.1010603@siemens.com>

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

On 10/28/2009 04:01 PM, Jan Kiszka wrote:
> Avi Kivity wrote:
>    
>> On 10/27/2009 03:25 PM, Avi Kivity wrote:
>>      
>>> On 10/27/2009 03:24 PM, Avi Kivity wrote:
>>>        
>>>> Worked for me - getting to the initial prompt.  Do you have
>>>>
>>>>     CONFIG_USER_RETURN_NOTIFIER=y
>>>>
>>>> in your .config?
>>>>
>>>>          
>>> If you do, send your own .config, will try to reproduce.
>>>
>>>        
>> As I can't reproduce it, can you send a trace of what's going on?
>>
>> The kvm:kvm_msr and kvm:kvm_cr events should suffice to understand
>> what's going on.  Please enlarge your buffer size (buffer_size_kb) so we
>> don't drop events.
>>
>>      
> Find such a trace attached. I hope I caught all important events (there
> were tons of identical kvm_cr events before them which I cut off).
>    

[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?

-- 
error compiling committee.c: too many arguments to function


[-- Attachment #2: efer-debug.patch --]
[-- Type: text/x-patch, Size: 1346 bytes --]

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;
 

  reply	other threads:[~2009-10-28 16:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27 12:52 BUG with Win7 and user-return-notifier Jan Kiszka
2009-10-27 13:11 ` Avi Kivity
2009-10-27 13:13   ` Jan Kiszka
2009-10-27 13:24     ` Avi Kivity
2009-10-27 13:25       ` Avi Kivity
2009-10-28  8:18         ` Avi Kivity
2009-10-28 14:01           ` Jan Kiszka
2009-10-28 16:00             ` Avi Kivity [this message]
2009-10-28 19:55               ` Jan Kiszka
     [not found]               ` <4AE8AC20.50506@web.de>
2009-10-29  7:37                 ` Avi Kivity
2009-10-29  8:03                   ` Jan Kiszka
2009-10-29  8:06                     ` Jan Kiszka
2009-10-29  8:07                     ` Avi Kivity
2009-10-29  8:32                       ` Jan Kiszka
2009-10-29 15:45                         ` Jan Kiszka
2009-10-29 16:05                           ` Avi Kivity
2009-10-29 16:07                   ` Jan Kiszka
2009-10-29 16:14                     ` Jan Kiszka
2009-10-29 16:52                       ` Avi Kivity
2009-10-29 16:49                     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE86AA0.1060802@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox