All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] current qemu git does not work with win7 guest
@ 2012-05-06 19:03 Michael Tokarev
  2012-05-07  6:06 ` Michael Tokarev
  0 siblings, 1 reply; 19+ messages in thread
From: Michael Tokarev @ 2012-05-06 19:03 UTC (permalink / raw)
  To: qemu-devel

This is just a heads-up.  I tried building current
qemu git today and running a win7 guest in it.  Neither
already installed guest (which finds new hardware and
want to reboot) nor freshly installed win7 boots:
it boots for the first time, next it installs drivers,
but on reboot it BSODs with

STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
 0x000000000000000, 0x000000000000000)

which is - according to ms docs - some HAL initialization
error, maybe related to ACPI.

But apparently subsequent boots works.  The freshly installed
win7 asked me something (even suggested to run safe mode
or something like that), I told it to boot normally and it
booted, and - seemingly - works since that.

Still, this first-reboot-stop-0x0000005c is something I
have never seen from qemu or kvm before, even very old
versions worked fine.

P.S. I used 32bit version of qemu userspace and 32bit
version of win7 guest (so far), with 1G guest ram and
-cpu host, from AthlonII host cpu, and with -smp 1.

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-06 19:03 [Qemu-devel] current qemu git does not work with win7 guest Michael Tokarev
@ 2012-05-07  6:06 ` Michael Tokarev
  2012-05-07  7:45   ` Gleb Natapov
  2012-05-07 13:51   ` Michael Tokarev
  0 siblings, 2 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07  6:06 UTC (permalink / raw)
  To: qemu-devel

On 06.05.2012 23:03, Michael Tokarev wrote:
> This is just a heads-up.  I tried building current
> qemu git today and running a win7 guest in it.  Neither
> already installed guest (which finds new hardware and
> want to reboot) nor freshly installed win7 boots:
> it boots for the first time, next it installs drivers,
> but on reboot it BSODs with
> 
> STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
>  0x000000000000000, 0x000000000000000)
> 
> which is - according to ms docs - some HAL initialization
> error, maybe related to ACPI.
> 
> But apparently subsequent boots works.  The freshly installed
> win7 asked me something (even suggested to run safe mode
> or something like that), I told it to boot normally and it
> booted, and - seemingly - works since that.
> 
> Still, this first-reboot-stop-0x0000005c is something I
> have never seen from qemu or kvm before, even very old
> versions worked fine.

And the previously installed guest never reboots in currrent
git version, always giving the 0x5c STOP code after first
boot.  This is aint good at all, as existing guests does
not work anymore..... :(

Thanks,

/mjt

> P.S. I used 32bit version of qemu userspace and 32bit
> version of win7 guest (so far), with 1G guest ram and
> -cpu host, from AthlonII host cpu, and with -smp 1.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  6:06 ` Michael Tokarev
@ 2012-05-07  7:45   ` Gleb Natapov
  2012-05-07  8:01     ` Michael Tokarev
  2012-05-07 13:51   ` Michael Tokarev
  1 sibling, 1 reply; 19+ messages in thread
From: Gleb Natapov @ 2012-05-07  7:45 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel

On Mon, May 07, 2012 at 10:06:58AM +0400, Michael Tokarev wrote:
> On 06.05.2012 23:03, Michael Tokarev wrote:
> > This is just a heads-up.  I tried building current
> > qemu git today and running a win7 guest in it.  Neither
> > already installed guest (which finds new hardware and
> > want to reboot) nor freshly installed win7 boots:
> > it boots for the first time, next it installs drivers,
> > but on reboot it BSODs with
> > 
> > STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
> >  0x000000000000000, 0x000000000000000)
> > 
> > which is - according to ms docs - some HAL initialization
> > error, maybe related to ACPI.
> > 
> > But apparently subsequent boots works.  The freshly installed
> > win7 asked me something (even suggested to run safe mode
> > or something like that), I told it to boot normally and it
> > booted, and - seemingly - works since that.
> > 
> > Still, this first-reboot-stop-0x0000005c is something I
> > have never seen from qemu or kvm before, even very old
> > versions worked fine.
> 
> And the previously installed guest never reboots in currrent
> git version, always giving the 0x5c STOP code after first
> boot.  This is aint good at all, as existing guests does
> not work anymore..... :(
> 
> 
> /mjt
> 
> > P.S. I used 32bit version of qemu userspace and 32bit
> > version of win7 guest (so far), with 1G guest ram and
> > -cpu host, from AthlonII host cpu, and with -smp 1.
Can you verify that issue also exist in 64 bit version? What about
qemu-kvm?

--
			Gleb.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  7:45   ` Gleb Natapov
@ 2012-05-07  8:01     ` Michael Tokarev
  2012-05-07  8:06       ` Gleb Natapov
  0 siblings, 1 reply; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07  8:01 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: qemu-devel

On 07.05.2012 11:45, Gleb Natapov wrote:
> On Mon, May 07, 2012 at 10:06:58AM +0400, Michael Tokarev wrote:
>> On 06.05.2012 23:03, Michael Tokarev wrote:
>>> This is just a heads-up.  I tried building current
>>> qemu git today and running a win7 guest in it.  Neither
>>> already installed guest (which finds new hardware and
>>> want to reboot) nor freshly installed win7 boots:
>>> it boots for the first time, next it installs drivers,
>>> but on reboot it BSODs with
>>>
>>> STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
>>>  0x000000000000000, 0x000000000000000)
>>>
>>> which is - according to ms docs - some HAL initialization
>>> error, maybe related to ACPI.
>>>
>>> But apparently subsequent boots works.  The freshly installed
>>> win7 asked me something (even suggested to run safe mode
>>> or something like that), I told it to boot normally and it
>>> booted, and - seemingly - works since that.
>>>
>>> Still, this first-reboot-stop-0x0000005c is something I
>>> have never seen from qemu or kvm before, even very old
>>> versions worked fine.
>>
>> And the previously installed guest never reboots in currrent
>> git version, always giving the 0x5c STOP code after first
>> boot.  This is aint good at all, as existing guests does
>> not work anymore..... :(
>>

>>> P.S. I used 32bit version of qemu userspace and 32bit
>>> version of win7 guest (so far), with 1G guest ram and
>>> -cpu host, from AthlonII host cpu, and with -smp 1.

> Can you verify that issue also exist in 64 bit version? What about
> qemu-kvm?

I'm trying.  But the problem is that right now I'm swamped
with other work.  So far win7 x64 appears to work, it
reboots without showing this "stop" thing or other issues,
even with 32bit qemu userspace.

Hmm.  I've seen something has been mentioned about seabios and
borken 32 bit winXP guest due to some 64bit patch, just today...
Lemme check...

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  8:01     ` Michael Tokarev
@ 2012-05-07  8:06       ` Gleb Natapov
  2012-05-07  8:37         ` Michael Tokarev
  2012-05-07  9:54         ` Michael Tokarev
  0 siblings, 2 replies; 19+ messages in thread
From: Gleb Natapov @ 2012-05-07  8:06 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel

On Mon, May 07, 2012 at 12:01:47PM +0400, Michael Tokarev wrote:
> On 07.05.2012 11:45, Gleb Natapov wrote:
> > On Mon, May 07, 2012 at 10:06:58AM +0400, Michael Tokarev wrote:
> >> On 06.05.2012 23:03, Michael Tokarev wrote:
> >>> This is just a heads-up.  I tried building current
> >>> qemu git today and running a win7 guest in it.  Neither
> >>> already installed guest (which finds new hardware and
> >>> want to reboot) nor freshly installed win7 boots:
> >>> it boots for the first time, next it installs drivers,
> >>> but on reboot it BSODs with
> >>>
> >>> STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
> >>>  0x000000000000000, 0x000000000000000)
> >>>
> >>> which is - according to ms docs - some HAL initialization
> >>> error, maybe related to ACPI.
> >>>
> >>> But apparently subsequent boots works.  The freshly installed
> >>> win7 asked me something (even suggested to run safe mode
> >>> or something like that), I told it to boot normally and it
> >>> booted, and - seemingly - works since that.
> >>>
> >>> Still, this first-reboot-stop-0x0000005c is something I
> >>> have never seen from qemu or kvm before, even very old
> >>> versions worked fine.
> >>
> >> And the previously installed guest never reboots in currrent
> >> git version, always giving the 0x5c STOP code after first
> >> boot.  This is aint good at all, as existing guests does
> >> not work anymore..... :(
> >>
> 
> >>> P.S. I used 32bit version of qemu userspace and 32bit
> >>> version of win7 guest (so far), with 1G guest ram and
> >>> -cpu host, from AthlonII host cpu, and with -smp 1.
> 
> > Can you verify that issue also exist in 64 bit version? What about
> > qemu-kvm?
> 
> I'm trying.  But the problem is that right now I'm swamped
> with other work.  So far win7 x64 appears to work, it
> reboots without showing this "stop" thing or other issues,
> even with 32bit qemu userspace.
> 
Sorry, didn't make myself clear. I mean 32bit version of host
kernel/qemu just to rule 32bitness out.

> Hmm.  I've seen something has been mentioned about seabios and
> borken 32 bit winXP guest due to some 64bit patch, just today...
> Lemme check...
> 
The patch is not in any released version as far as I see. Are you using
Seabios upstream?

--
			Gleb.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  8:06       ` Gleb Natapov
@ 2012-05-07  8:37         ` Michael Tokarev
  2012-05-07  9:54         ` Michael Tokarev
  1 sibling, 0 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07  8:37 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: qemu-devel

On 07.05.2012 12:06, Gleb Natapov wrote:
> On Mon, May 07, 2012 at 12:01:47PM +0400, Michael Tokarev wrote:
[]
>> I'm trying.  But the problem is that right now I'm swamped
>> with other work.  So far win7 x64 appears to work, it
>> reboots without showing this "stop" thing or other issues,
>> even with 32bit qemu userspace.
>>
> Sorry, didn't make myself clear. I mean 32bit version of host
> kernel/qemu just to rule 32bitness out.

Yet I now know that win64 is okay with current qemu ;)

I'll try 64bit version of qemu later today.

>> Hmm.  I've seen something has been mentioned about seabios and
>> borken 32 bit winXP guest due to some 64bit patch, just today...
>> Lemme check...
>>
> The patch is not in any released version as far as I see. Are you using
> Seabios upstream?

No, I use whatever comes with qemu itself.  The thing just reminded
about something very similar mentioned recently, and I wanted to
check.  And indeed, it is someting not relevant to this context.

Thanks,

/mjt
> 
> --
> 			Gleb.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  8:06       ` Gleb Natapov
  2012-05-07  8:37         ` Michael Tokarev
@ 2012-05-07  9:54         ` Michael Tokarev
  2012-05-07 10:16           ` Gleb Natapov
  1 sibling, 1 reply; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07  9:54 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: qemu-devel

On 07.05.2012 12:06, Gleb Natapov wrote:
> On Mon, May 07, 2012 at 12:01:47PM +0400, Michael Tokarev wrote:
[]
>>>> And the previously installed guest never reboots in currrent
>>>> git version, always giving the 0x5c STOP code after first
>>>> boot.  This is aint good at all, as existing guests does
>>>> not work anymore..... :(
>>
>>>>> P.S. I used 32bit version of qemu userspace and 32bit
>>>>> version of win7 guest (so far), with 1G guest ram and
>>>>> -cpu host, from AthlonII host cpu, and with -smp 1.
>>
>>> Can you verify that issue also exist in 64 bit version? What about
>>> qemu-kvm?
>>
>> I'm trying.  But the problem is that right now I'm swamped
>> with other work.  So far win7 x64 appears to work, it
>> reboots without showing this "stop" thing or other issues,
>> even with 32bit qemu userspace.
>>
> Sorry, didn't make myself clear. I mean 32bit version of host
> kernel/qemu just to rule 32bitness out.

Ok.  So it apparently works fine in 64bit version of qemu
userspace,  but not in 32bit version.  The same issue demonstrates
winXP machine too (also 32bits, and also only on 32bit version
of qemu).

And I don't have time right now for any reasonable bisection... sigh.

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  9:54         ` Michael Tokarev
@ 2012-05-07 10:16           ` Gleb Natapov
  2012-05-07 10:26             ` Michael Tokarev
  0 siblings, 1 reply; 19+ messages in thread
From: Gleb Natapov @ 2012-05-07 10:16 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel

On Mon, May 07, 2012 at 01:54:19PM +0400, Michael Tokarev wrote:
> On 07.05.2012 12:06, Gleb Natapov wrote:
> > On Mon, May 07, 2012 at 12:01:47PM +0400, Michael Tokarev wrote:
> []
> >>>> And the previously installed guest never reboots in currrent
> >>>> git version, always giving the 0x5c STOP code after first
> >>>> boot.  This is aint good at all, as existing guests does
> >>>> not work anymore..... :(
> >>
> >>>>> P.S. I used 32bit version of qemu userspace and 32bit
> >>>>> version of win7 guest (so far), with 1G guest ram and
> >>>>> -cpu host, from AthlonII host cpu, and with -smp 1.
> >>
> >>> Can you verify that issue also exist in 64 bit version? What about
> >>> qemu-kvm?
> >>
> >> I'm trying.  But the problem is that right now I'm swamped
> >> with other work.  So far win7 x64 appears to work, it
> >> reboots without showing this "stop" thing or other issues,
> >> even with 32bit qemu userspace.
> >>
> > Sorry, didn't make myself clear. I mean 32bit version of host
> > kernel/qemu just to rule 32bitness out.
> 
> Ok.  So it apparently works fine in 64bit version of qemu
> userspace,  but not in 32bit version.  The same issue demonstrates
> winXP machine too (also 32bits, and also only on 32bit version
> of qemu).
> 
> And I don't have time right now for any reasonable bisection... sigh.
> 
Can you just quickly check if the same issue exists in qemu-kvm?

--
			Gleb.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 10:16           ` Gleb Natapov
@ 2012-05-07 10:26             ` Michael Tokarev
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 10:26 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: qemu-devel

On 07.05.2012 14:16, Gleb Natapov wrote:
> On Mon, May 07, 2012 at 01:54:19PM +0400, Michael Tokarev wrote:
>> On 07.05.2012 12:06, Gleb Natapov wrote:
>>> On Mon, May 07, 2012 at 12:01:47PM +0400, Michael Tokarev wrote:
>> []
>>>>>> And the previously installed guest never reboots in currrent
>>>>>> git version, always giving the 0x5c STOP code after first
>>>>>> boot.  This is aint good at all, as existing guests does
>>>>>> not work anymore..... :(
>>>>
>>>>>>> P.S. I used 32bit version of qemu userspace and 32bit
>>>>>>> version of win7 guest (so far), with 1G guest ram and
>>>>>>> -cpu host, from AthlonII host cpu, and with -smp 1.
>>>>
>>>>> Can you verify that issue also exist in 64 bit version? What about
>>>>> qemu-kvm?
>>>>
>>>> I'm trying.  But the problem is that right now I'm swamped
>>>> with other work.  So far win7 x64 appears to work, it
>>>> reboots without showing this "stop" thing or other issues,
>>>> even with 32bit qemu userspace.
>>>>
>>> Sorry, didn't make myself clear. I mean 32bit version of host
>>> kernel/qemu just to rule 32bitness out.
>>
>> Ok.  So it apparently works fine in 64bit version of qemu
>> userspace,  but not in 32bit version.  The same issue demonstrates
>> winXP machine too (also 32bits, and also only on 32bit version
>> of qemu).
>>
>> And I don't have time right now for any reasonable bisection... sigh.
>>
> Can you just quickly check if the same issue exists in qemu-kvm?

qemu-kvm (last patch from Apr-26, b320b8b70bd4f5f) reboots fine.

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07  6:06 ` Michael Tokarev
  2012-05-07  7:45   ` Gleb Natapov
@ 2012-05-07 13:51   ` Michael Tokarev
  2012-05-07 14:18     ` Jan Kiszka
  2012-05-07 16:06     ` Avi Kivity
  1 sibling, 2 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 13:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Gleb Natapov

So, refreshing it all again with more correct information.

First, it appears that only 32bit version of qemu userspace is
affected, and only when using 32bit version of guest.  So far,
either 64bit qemu userpace or 64bit windows7 guest is enough
for the issue to not show up.  Second, both win7 and winXP
(32bit) are affected.  Third, current qemu-kvm/master appears
to be unaffected too.

The problem is that on first and all subsequent guest REBOOT
(not first boot but really REBOOT) -- after the guest rebuilt
its HAL I guess, due to some changes in "hardware" it noticed, --
the guest BSODs during boot with this code:

 STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
      0x000000000000000, 0x000000000000000)

After painful bisection between 1.0 and current git, the result
is this:

First bad commit:
commit 5b6fb069378e61c45c577bbec3d7ef60367f7e4c
Author: Avi Kivity <avi@redhat.com>
Date:   Thu Mar 1 12:58:46 2012 +0200

    pc-bios: update kvmvapic.bin

    Signed-off-by: Avi Kivity <avi@redhat.com>

diff --git a/pc-bios/kvmvapic.bin b/pc-bios/kvmvapic.bin
new file mode 100755
index 0000000..045f5c2
Binary files /dev/null and b/pc-bios/kvmvapic.bin differ

Which, despite the name, actually INTRODUCES kvmvapic.bin,
not merely updates it.  So apparently this introduction of
kvmvapic.bin resulted in autoloading implemented earlier to
starte entering the game, which appears to be this one:

commit e5ad936b0fd7dfd7fd7908be6f9f1ca88f63b96b
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date:   Fri Feb 17 18:31:19 2012 +0100

    kvmvapic: Introduce TPR access optimization for Windows guests

And indeed, we're talking about windows guests here...

Anything I can do further to debug/fix the issue?

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 13:51   ` Michael Tokarev
@ 2012-05-07 14:18     ` Jan Kiszka
  2012-05-07 14:35       ` Michael Tokarev
  2012-05-07 16:06     ` Avi Kivity
  1 sibling, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2012-05-07 14:18 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel, Gleb Natapov

On 2012-05-07 10:51, Michael Tokarev wrote:
> So, refreshing it all again with more correct information.
> 
> First, it appears that only 32bit version of qemu userspace is
> affected, and only when using 32bit version of guest.  So far,
> either 64bit qemu userpace or 64bit windows7 guest is enough
> for the issue to not show up.  Second, both win7 and winXP
> (32bit) are affected.  Third, current qemu-kvm/master appears
> to be unaffected too.
> 
> The problem is that on first and all subsequent guest REBOOT
> (not first boot but really REBOOT) -- after the guest rebuilt
> its HAL I guess, due to some changes in "hardware" it noticed, --
> the guest BSODs during boot with this code:
> 
>  STOP: 0x0000005C (0x000000000000010B, 0x0000000000000003,
>       0x000000000000000, 0x000000000000000)
> 
> After painful bisection between 1.0 and current git, the result
> is this:
> 
> First bad commit:
> commit 5b6fb069378e61c45c577bbec3d7ef60367f7e4c
> Author: Avi Kivity <avi@redhat.com>
> Date:   Thu Mar 1 12:58:46 2012 +0200
> 
>     pc-bios: update kvmvapic.bin
> 
>     Signed-off-by: Avi Kivity <avi@redhat.com>
> 
> diff --git a/pc-bios/kvmvapic.bin b/pc-bios/kvmvapic.bin
> new file mode 100755
> index 0000000..045f5c2
> Binary files /dev/null and b/pc-bios/kvmvapic.bin differ
> 
> Which, despite the name, actually INTRODUCES kvmvapic.bin,
> not merely updates it.  So apparently this introduction of
> kvmvapic.bin resulted in autoloading implemented earlier to
> starte entering the game, which appears to be this one:
> 
> commit e5ad936b0fd7dfd7fd7908be6f9f1ca88f63b96b
> Author: Jan Kiszka <jan.kiszka@siemens.com>
> Date:   Fri Feb 17 18:31:19 2012 +0100
> 
>     kvmvapic: Introduce TPR access optimization for Windows guests
> 
> And indeed, we're talking about windows guests here...
> 
> Anything I can do further to debug/fix the issue?
> 

I have a 32-bit WinXP here to test (but not a Win7-32) and will give it
a try later. What irritates me is that qemu.git has a problem here but
not latest qemu-kvm.git. Both are very similar now. Hmm, what is your
qemu.git command line again? Does it include "-machine
accel=kvm,kernel_irqchip=on" (to enable in-kernel irqchip)?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 14:18     ` Jan Kiszka
@ 2012-05-07 14:35       ` Michael Tokarev
  2012-05-07 14:40         ` Jan Kiszka
  2012-05-07 14:45         ` Michael Tokarev
  0 siblings, 2 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 14:35 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Gleb Natapov

On 07.05.2012 18:18, Jan Kiszka wrote:
[]
> I have a 32-bit WinXP here to test (but not a Win7-32) and will give it

I just found out that a 32bit guest is not enough.  The problem appears
to be with 32bit userspace running under 64bit kernel only.  I just
booted a 32bit kernel here on host, and now all windows guests reboot
fine, with and without kvmvapic.bin file.

> a try later. What irritates me is that qemu.git has a problem here but
> not latest qemu-kvm.git. Both are very similar now. Hmm, what is your
> qemu.git command line again? Does it include "-machine
> accel=kvm,kernel_irqchip=on" (to enable in-kernel irqchip)?

Rebooting... ;)

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 14:35       ` Michael Tokarev
@ 2012-05-07 14:40         ` Jan Kiszka
  2012-05-07 14:45         ` Michael Tokarev
  1 sibling, 0 replies; 19+ messages in thread
From: Jan Kiszka @ 2012-05-07 14:40 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel, Gleb Natapov

On 2012-05-07 11:35, Michael Tokarev wrote:
> On 07.05.2012 18:18, Jan Kiszka wrote:
> []
>> I have a 32-bit WinXP here to test (but not a Win7-32) and will give it
> 
> I just found out that a 32bit guest is not enough.  The problem appears
> to be with 32bit userspace running under 64bit kernel only.  I just
> booted a 32bit kernel here on host, and now all windows guests reboot
> fine, with and without kvmvapic.bin file.

With 32bit userspace you mean 32-bit qemu running on 64-bit kernel?
Smells like some alignment issue in the vapic data structures.

> 
>> a try later. What irritates me is that qemu.git has a problem here but
>> not latest qemu-kvm.git. Both are very similar now. Hmm, what is your
>> qemu.git command line again? Does it include "-machine
>> accel=kvm,kernel_irqchip=on" (to enable in-kernel irqchip)?
> 
> Rebooting... ;)

Ok. :)

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 14:35       ` Michael Tokarev
  2012-05-07 14:40         ` Jan Kiszka
@ 2012-05-07 14:45         ` Michael Tokarev
  2012-05-07 15:32           ` Jan Kiszka
  1 sibling, 1 reply; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 14:45 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Gleb Natapov

On 07.05.2012 18:35, Michael Tokarev wrote:
> On 07.05.2012 18:18, Jan Kiszka wrote:
> []
>> I have a 32-bit WinXP here to test (but not a Win7-32) and will give it
> 
> I just found out that a 32bit guest is not enough.  The problem appears
> to be with 32bit userspace running under 64bit kernel only.  I just
> booted a 32bit kernel here on host, and now all windows guests reboot
> fine, with and without kvmvapic.bin file.
> 
>> a try later. What irritates me is that qemu.git has a problem here but
>> not latest qemu-kvm.git. Both are very similar now. Hmm, what is your
>> qemu.git command line again? Does it include "-machine
>> accel=kvm,kernel_irqchip=on" (to enable in-kernel irqchip)?
> 
> Rebooting... ;)

With kernel_irqchip=on it does not happen with qemu too, just like with
qemu-kvm.  So only 32bit userspace on 64bit kernel, and only with
kernel_irqchip = OFF, and only with 32bit version of win7 or winXP.

The kernel line is rather simple:

$ ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive file=w7x32sp1.raw,if=virtio,snapshot=on -m 1G -net none -machine accel=kvm,kernel_irqchip=on

Thanks!

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 14:45         ` Michael Tokarev
@ 2012-05-07 15:32           ` Jan Kiszka
  2012-05-07 17:48             ` Michael Tokarev
  0 siblings, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2012-05-07 15:32 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel, Gleb Natapov

On 2012-05-07 11:45, Michael Tokarev wrote:
> On 07.05.2012 18:35, Michael Tokarev wrote:
>> On 07.05.2012 18:18, Jan Kiszka wrote:
>> []
>>> I have a 32-bit WinXP here to test (but not a Win7-32) and will give it
>>
>> I just found out that a 32bit guest is not enough.  The problem appears
>> to be with 32bit userspace running under 64bit kernel only.  I just
>> booted a 32bit kernel here on host, and now all windows guests reboot
>> fine, with and without kvmvapic.bin file.
>>
>>> a try later. What irritates me is that qemu.git has a problem here but
>>> not latest qemu-kvm.git. Both are very similar now. Hmm, what is your
>>> qemu.git command line again? Does it include "-machine
>>> accel=kvm,kernel_irqchip=on" (to enable in-kernel irqchip)?
>>
>> Rebooting... ;)
> 
> With kernel_irqchip=on it does not happen with qemu too, just like with
> qemu-kvm.  So only 32bit userspace on 64bit kernel, and only with
> kernel_irqchip = OFF, and only with 32bit version of win7 or winXP.
> 
> The kernel line is rather simple:
> 
> $ ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive file=w7x32sp1.raw,if=virtio,snapshot=on -m 1G -net none -machine accel=kvm,kernel_irqchip=on

Can you check if -global apic.vapic=off makes any difference in the
broken case? I'm facing general issues in that setup once I enable
virtio-block - independent of vapic on/off or in-kernel/userspace. The
boot freezes, and qemu can only be terminated via kill -9. So, retrying
with IDE as block interface would also be interesting.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 13:51   ` Michael Tokarev
  2012-05-07 14:18     ` Jan Kiszka
@ 2012-05-07 16:06     ` Avi Kivity
  1 sibling, 0 replies; 19+ messages in thread
From: Avi Kivity @ 2012-05-07 16:06 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Jan Kiszka, qemu-devel, Gleb Natapov

On 05/07/2012 04:51 PM, Michael Tokarev wrote:
> So, refreshing it all again with more correct information.
>
> First, it appears that only 32bit version of qemu userspace is
> affected, and only when using 32bit version of guest.  So far,
> either 64bit qemu userpace or 64bit windows7 guest is enough
> for the issue to not show up.  Second, both win7 and winXP
> (32bit) are affected.  Third, current qemu-kvm/master appears
> to be unaffected too.
>
> The problem is that on first and all subsequent guest REBOOT
> (not first boot but really REBOOT) -- after the guest rebuilt
> its HAL I guess, due to some changes in "hardware" it noticed, --
> the guest BSODs during boot with this code:
>
>

Something that is different in a reboot, is that patching the ROM is
skipped.  Please try removing the following lines from hw/kvmvapic.c's
update_rom_mapping():

    /* fixup addresses in ROM if needed */
    if (rom_state_vaddr == le32_to_cpu(s->rom_state.vaddr)) {
        return 0;
    }

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 15:32           ` Jan Kiszka
@ 2012-05-07 17:48             ` Michael Tokarev
  2012-05-07 18:07               ` Jan Kiszka
  0 siblings, 1 reply; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 17:48 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Gleb Natapov

On 07.05.2012 19:32, Jan Kiszka wrote:
> On 2012-05-07 11:45, Michael Tokarev wrote:
[]
>> $ ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive file=w7x32sp1.raw,if=virtio,snapshot=on -m 1G -net none -machine accel=kvm,kernel_irqchip=on
> 
> Can you check if -global apic.vapic=off makes any difference in the
> broken case? I'm facing general issues in that setup once I enable
> virtio-block - independent of vapic on/off or in-kernel/userspace. The
> boot freezes, and qemu can only be terminated via kill -9. So, retrying
> with IDE as block interface would also be interesting.

Both switching from virtio to ide and disabling vapic fixes the reboot
issue, so win guests starts rebooting fine.


On 07.05.2012 20:06, Avi Kivity wrote:
> Something that is different in a reboot, is that patching the ROM is
> skipped.  Please try removing the following lines from hw/kvmvapic.c's
> update_rom_mapping():
>
>     /* fixup addresses in ROM if needed */
>     if (rom_state_vaddr == le32_to_cpu(s->rom_state.vaddr)) {
>         return 0;
>     }
>

And commenting out this code does not change anything -- with virtio-blk
the guest does not reboot with STOP 0x5c code as before.

Thanks!

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 17:48             ` Michael Tokarev
@ 2012-05-07 18:07               ` Jan Kiszka
  2012-05-07 18:21                 ` Michael Tokarev
  0 siblings, 1 reply; 19+ messages in thread
From: Jan Kiszka @ 2012-05-07 18:07 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel, Gleb Natapov

On 2012-05-07 14:48, Michael Tokarev wrote:
> On 07.05.2012 19:32, Jan Kiszka wrote:
>> On 2012-05-07 11:45, Michael Tokarev wrote:
> []
>>> $ ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive file=w7x32sp1.raw,if=virtio,snapshot=on -m 1G -net none -machine accel=kvm,kernel_irqchip=on
>>
>> Can you check if -global apic.vapic=off makes any difference in the
>> broken case? I'm facing general issues in that setup once I enable
>> virtio-block - independent of vapic on/off or in-kernel/userspace. The
>> boot freezes, and qemu can only be terminated via kill -9. So, retrying
>> with IDE as block interface would also be interesting.
> 
> Both switching from virtio to ide and disabling vapic fixes the reboot
> issue, so win guests starts rebooting fine.

You mean doing both at the same time, or also when you only apply one
workaround? For me, disabling the vapic had _no_ impact, only disabling
virtio allowed to boot at all.

I suspect something is subtly broken in qemu, and it is not directly
related to the vapic, maybe even not virtio.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Qemu-devel] current qemu git does not work with win7 guest
  2012-05-07 18:07               ` Jan Kiszka
@ 2012-05-07 18:21                 ` Michael Tokarev
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Tokarev @ 2012-05-07 18:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Gleb Natapov

On 07.05.2012 22:07, Jan Kiszka wrote:
> On 2012-05-07 14:48, Michael Tokarev wrote:
>> On 07.05.2012 19:32, Jan Kiszka wrote:
>>> On 2012-05-07 11:45, Michael Tokarev wrote:
>> []
>>>> $ ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive file=w7x32sp1.raw,if=virtio,snapshot=on -m 1G -net none -machine accel=kvm,kernel_irqchip=on
>>>
>>> Can you check if -global apic.vapic=off makes any difference in the
>>> broken case? I'm facing general issues in that setup once I enable
>>> virtio-block - independent of vapic on/off or in-kernel/userspace. The
>>> boot freezes, and qemu can only be terminated via kill -9. So, retrying
>>> with IDE as block interface would also be interesting.
>>
>> Both switching from virtio to ide and disabling vapic fixes the reboot
>> issue, so win guests starts rebooting fine.
> 
> You mean doing both at the same time, or also when you only apply one
> workaround? For me, disabling the vapic had _no_ impact, only disabling
> virtio allowed to boot at all.

One at a time - either vapic=off or virtio=>ide.  Both at once also works.
I just rechecked, -- yes indeed, any of the two is enought to make win
guest to reboot fine.  Sorry for being unclean.

> I suspect something is subtly broken in qemu, and it is not directly
> related to the vapic, maybe even not virtio.

Well, might be, in your case.. ;)

Yes I understand that you've hit different issue there.  Just like
me while trying to bisect it, -- I've hit the -vga std non-functioning
somewhere in between 1.0 and current ;)

The issue I'm hitting is quite "reliable", so to say.

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-05-07 18:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-06 19:03 [Qemu-devel] current qemu git does not work with win7 guest Michael Tokarev
2012-05-07  6:06 ` Michael Tokarev
2012-05-07  7:45   ` Gleb Natapov
2012-05-07  8:01     ` Michael Tokarev
2012-05-07  8:06       ` Gleb Natapov
2012-05-07  8:37         ` Michael Tokarev
2012-05-07  9:54         ` Michael Tokarev
2012-05-07 10:16           ` Gleb Natapov
2012-05-07 10:26             ` Michael Tokarev
2012-05-07 13:51   ` Michael Tokarev
2012-05-07 14:18     ` Jan Kiszka
2012-05-07 14:35       ` Michael Tokarev
2012-05-07 14:40         ` Jan Kiszka
2012-05-07 14:45         ` Michael Tokarev
2012-05-07 15:32           ` Jan Kiszka
2012-05-07 17:48             ` Michael Tokarev
2012-05-07 18:07               ` Jan Kiszka
2012-05-07 18:21                 ` Michael Tokarev
2012-05-07 16:06     ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.