public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* kvm-22 and Vista support
@ 2007-05-07  5:58 Jorge Lucángeli Obes
       [not found] ` <59abf66e0705062258m54949118n26c8a24c55d0322c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Jorge Lucángeli Obes @ 2007-05-07  5:58 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> The happy theme of today's kvm is the significant performance
> improvements, brought to you by a growing team of developers.  I've
> clocked kbuild at within 25% of native.  This release also introduces
> support for 32-bit Windows Vista.
>
> Changes from kvm-21:
> - Significant performance improvements (Anthony Liguori, Eddie Dong,
> Qing He, me)
> - Fix longstanding bug: time runs at double speed on x86_64 Linux (Qing He)
> - Windows Vista 32-bit support (Qing He, Jun Nakajima)
> - Support for kvm abi 10 modules
> - Minor updates

Hi Avi, hi all,

Let me start by congratulating you on the amazing work you are doing
with kvm. I've been using a 32-bit Windows XP guest on a 64-bit
Xubuntu Feisty host for quite some time now with no glitches at all
and extremely good performance.

I have also tried using Windows Vista with kvm. Until now, I had (of
course) the same ACPI problem as everybody. I had decided to compile
the new BIOS by hand. Imagine my suprise when I saw the third entry in
the above list =). I rushed to get my Vista Ultimate installation DVD.
The install went great, I even managed to create a user. However, I
did not get past this. After creating my user, the guest reboots (or
more precisely, it shuts down since I'm running 'no-reboot') and when
I start it again, it stops with what I believe is a real mode error:

tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
-no-reboot -localtime -no-rtc
exception 13 (0)
rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
0000000000000001
rsi 0000000000000180 rdi 0000000000007000 rsp 0000000000001e60 rbp
0000000000001e98
r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11
0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
0000000000000000
rip 0000000000009a12 rflags 00033006
cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt bb68/27
idt 0/3ff
cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
Aborted

Running with 'no-kvm' manages to solve this but I don't get to the
login screen. The guest quits unexpectedly while on the Vista
"bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22
(modules and userspace).

Any ideas? Have you guys done anything special to get Vista running?
What can I do to find out what's going on?

Yours,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found] ` <59abf66e0705062258m54949118n26c8a24c55d0322c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-05-07  7:52   ` Avi Kivity
       [not found]     ` <463EDAC3.80601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2007-05-07  7:52 UTC (permalink / raw)
  To: Jorge Lucángeli Obes; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Jorge Lucángeli Obes wrote:
> I have also tried using Windows Vista with kvm. Until now, I had (of
> course) the same ACPI problem as everybody. I had decided to compile
> the new BIOS by hand. Imagine my suprise when I saw the third entry in
> the above list =). I rushed to get my Vista Ultimate installation DVD.
> The install went great, I even managed to create a user. However, I
> did not get past this. After creating my user, the guest reboots (or
> more precisely, it shuts down since I'm running 'no-reboot') and when
> I start it again, it stops with what I believe is a real mode error:
>
> tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
> -no-reboot -localtime -no-rtc
> exception 13 (0)
> rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
> 0000000000000001
> rsi 0000000000000180 rdi 0000000000007000 rsp 0000000000001e60 rbp
> 0000000000001e98
> r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11
> 0000000000000000
> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
> 0000000000000000
> rip 0000000000009a12 rflags 00033006
> cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt bb68/27
> idt 0/3ff
> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> Aborted
>
> Running with 'no-kvm' manages to solve this but I don't get to the
> login screen. The guest quits unexpectedly while on the Vista
> "bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
> Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22
> (modules and userspace).
>
> Any ideas? Have you guys done anything special to get Vista running?
> What can I do to find out what's going on?
>   

Well, all I did was to apply a one-line patch from Qing He to the bios 
ROM.  I haven't even tried Vista myself :)  Maybe Qing can comment?

It does look like a real mode problem; I'll update the dump to show more 
information (e.g. the code at the point of failure).

Do you get anything in dmesg when the problem occurs?

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


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found]     ` <463EDAC3.80601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-05-08  3:37       ` He, Qing
  2007-05-08  4:52       ` Nakajima, Jun
  1 sibling, 0 replies; 9+ messages in thread
From: He, Qing @ 2007-05-08  3:37 UTC (permalink / raw)
  To: Avi Kivity, Jorge Lucángeli Obes
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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



>-----Original Message-----
>From: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>[mailto:kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Avi Kivity
>Sent: 2007年5月7日 15:53
>To: Jorge Lucángeli Obes
>Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>Subject: Re: [kvm-devel] kvm-22 and Vista support
>
>Jorge Lucángeli Obes wrote:
>> I have also tried using Windows Vista with kvm. Until now, I had (of
>> course) the same ACPI problem as everybody. I had decided to compile
>> the new BIOS by hand. Imagine my suprise when I saw the third entry in
>> the above list =). I rushed to get my Vista Ultimate installation DVD.
>> The install went great, I even managed to create a user. However, I
>> did not get past this. After creating my user, the guest reboots (or
>> more precisely, it shuts down since I'm running 'no-reboot') and when
>> I start it again, it stops with what I believe is a real mode error:
>>
>> tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
>> -no-reboot -localtime -no-rtc
>> exception 13 (0)
>> rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
>> 0000000000000001
>> rsi 0000000000000180 rdi 0000000000007000 rsp 0000000000001e60 rbp
>> 0000000000001e98
>> r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11
>> 0000000000000000
>> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
>> 0000000000000000
>> rip 0000000000009a12 rflags 00033006
>> cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
>> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
>> gdt bb68/27
>> idt 0/3ff
>> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
>> Aborted
>>
>> Running with 'no-kvm' manages to solve this but I don't get to the
>> login screen. The guest quits unexpectedly while on the Vista
>> "bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
>> Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22
>> (modules and userspace).
>>
>> Any ideas? Have you guys done anything special to get Vista running?
>> What can I do to find out what's going on?
>>
>
>Well, all I did was to apply a one-line patch from Qing He to the bios
>ROM.  I haven't even tried Vista myself :)  Maybe Qing can comment?

My environment is also 32bit Vista Ultimate on 64-bit Linux, and it works
fine for me :-)

I think this report is probably a separate issue. My patch only changes the
revision number of ACPI tables which circumvents a earlier checking of
Vista, other bugs may still exist.

>
>It does look like a real mode problem; I'll update the dump to show more
>information (e.g. the code at the point of failure).
>
>Do you get anything in dmesg when the problem occurs?
>
>--
>error compiling committee.c: too many arguments to function
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>kvm-devel mailing list
>kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/kvm-devel


[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: kvm-22 and Vista support
       [not found]     ` <463EDAC3.80601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  2007-05-08  3:37       ` He, Qing
@ 2007-05-08  4:52       ` Nakajima, Jun
       [not found]         ` <8FFF7E42E93CC646B632AB40643802A802941AE2-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Nakajima, Jun @ 2007-05-08  4:52 UTC (permalink / raw)
  To: Avi Kivity, Jorge Lucángeli Obes
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Avi Kivity wrote:
> Jorge Lucángeli Obes wrote:
>> I have also tried using Windows Vista with kvm. Until now, I had (of
>> course) the same ACPI problem as everybody. I had decided to compile
>> the new BIOS by hand. Imagine my suprise when I saw the third entry
>> in the above list =). I rushed to get my Vista Ultimate installation
>> DVD. The install went great, I even managed to create a user.
>> However, I did not get past this. After creating my user, the guest
>> reboots (or more precisely, it shuts down since I'm running
>> 'no-reboot') and when I start it again, it stops with what I believe
>> is a real mode error: 
>> 
>> tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
>> -no-reboot -localtime -no-rtc exception 13 (0)
>> rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
>> 0000000000000001 rsi 0000000000000180 rdi 0000000000007000 rsp
>> 0000000000001e60 rbp 0000000000001e98 r8  0000000000000000 r9 
>> 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12
>> 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
>> 0000000000000000 rip 0000000000009a12 rflags 00033006 
>> cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
>> tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
>> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
>> gdt bb68/27 idt 0/3ff
>> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
>> Aborted
>> 
>> Running with 'no-kvm' manages to solve this but I don't get to the
>> login screen. The guest quits unexpectedly while on the Vista
>> "bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
>> Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22
>> (modules and userspace). 
>> 
>> Any ideas? Have you guys done anything special to get Vista running?
>> What can I do to find out what's going on?
>> 
> 
> Well, all I did was to apply a one-line patch from Qing He to the bios
> ROM.  I haven't even tried Vista myself :)  Maybe Qing can comment?
> 
> It does look like a real mode problem; I'll update the dump to show
> more information (e.g. the code at the point of failure).

It's also possible that Vista did HLT (because we've got #GP) by finding some feature missing. Dumping the instruction should be very helpful.

> 
> Do you get anything in dmesg when the problem occurs?

Jun
---
Intel Open Source Technology Center

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found]         ` <8FFF7E42E93CC646B632AB40643802A802941AE2-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-05-23  3:11           ` Jorge Lucángeli Obes
       [not found]             ` <59abf66e0705222011l24200847sb39394630c692b67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Jorge Lucángeli Obes @ 2007-05-23  3:11 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 5/8/07, Nakajima, Jun <jun.nakajima-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> Avi Kivity wrote:
> > Jorge Lucángeli Obes wrote:
> >> I have also tried using Windows Vista with kvm. Until now, I had (of
> >> course) the same ACPI problem as everybody. I had decided to compile
> >> the new BIOS by hand. Imagine my suprise when I saw the third entry
> >> in the above list =). I rushed to get my Vista Ultimate installation
> >> DVD. The install went great, I even managed to create a user.
> >> However, I did not get past this. After creating my user, the guest
> >> reboots (or more precisely, it shuts down since I'm running
> >> 'no-reboot') and when I start it again, it stops with what I believe
> >> is a real mode error:
> >>
> >> tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
> >> -no-reboot -localtime -no-rtc exception 13 (0)
> >> rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
> >> 0000000000000001 rsi 0000000000000180 rdi 0000000000007000 rsp
> >> 0000000000001e60 rbp 0000000000001e98 r8  0000000000000000 r9
> >> 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12
> >> 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
> >> 0000000000000000 rip 0000000000009a12 rflags 00033006
> >> cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> >> tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> >> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> >> gdt bb68/27 idt 0/3ff
> >> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> >> Aborted
> >>
> >> Running with 'no-kvm' manages to solve this but I don't get to the
> >> login screen. The guest quits unexpectedly while on the Vista
> >> "bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
> >> Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22
> >> (modules and userspace).
> >>
> >> Any ideas? Have you guys done anything special to get Vista running?
> >> What can I do to find out what's going on?
> >>
> >
> > Well, all I did was to apply a one-line patch from Qing He to the bios
> > ROM.  I haven't even tried Vista myself :)  Maybe Qing can comment?
> >
> > It does look like a real mode problem; I'll update the dump to show
> > more information (e.g. the code at the point of failure).
>
> It's also possible that Vista did HLT (because we've got #GP) by finding some feature missing. Dumping the instruction should be very helpful.
>
> >
> > Do you get anything in dmesg when the problem occurs?

I had some time on my hands lately and tried to debug this a little. I
found that there's actually something showing in dmesg:

[ 3872.221039] emulation failed but !mmio_needed? rip 9a12 0f 09 66 25

Does that help? I'm running kvm-24 now, but the exception still
happens. I've been looking through x86_emulate.c and kvmctl.c trying
to print more information but with no success yet.

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found]             ` <59abf66e0705222011l24200847sb39394630c692b67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-05-23  4:43               ` Nakajima, Jun
  2007-05-23 12:55               ` Avi Kivity
  1 sibling, 0 replies; 9+ messages in thread
From: Nakajima, Jun @ 2007-05-23  4:43 UTC (permalink / raw)
  To: Jorge Lucángeli Obes,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Jorge Lucángeli Obes wrote:
> On 5/8/07, Nakajima, Jun <jun.nakajima-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > Avi Kivity wrote:
> > > Jorge Lucángeli Obes wrote:
> > > > I have also tried using Windows Vista with kvm. Until now, I had (of
> > > > course) the same ACPI problem as everybody. I had decided to compile
> > > > the new BIOS by hand. Imagine my suprise when I saw the third entry
> > > > in the above list =). I rushed to get my Vista Ultimate installation
> > > > DVD. The install went great, I even managed to create a user.
> > > > However, I did not get past this. After creating my user, the guest
> > > > reboots (or more precisely, it shuts down since I'm running
> > > > 'no-reboot') and when I start it again, it stops with what I believe is
> > > > a real mode error: 
> > > > 
> > > > tamsyn@rory:~/stuff/qemu$ sudo qemu-system-x86_64 vista.img -m 512
> > > > -no-reboot -localtime -no-rtc exception 13 (0)
> > > > rax 0000000060000010 rbx 0000000000004200 rcx 00000000000000ff rdx
> > > > 0000000000000001 rsi 0000000000000180 rdi 0000000000007000 rsp
> > > > 0000000000001e60 rbp 0000000000001e98 r8  0000000000000000 r9
> > > > 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12
> > > > 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
> > > > 0000000000000000 rip 0000000000009a12 rflags 00033006
> > > > cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > > > tr 0000 (20850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> > > > ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> > > > gdt bb68/27 idt 0/3ff cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> > > > Aborted
> > > > 
> > > > Running with 'no-kvm' manages to solve this but I don't get to the
> > > > login screen. The guest quits unexpectedly while on the Vista
> > > > "bootsplash". It's a 32-bit Vista Ultimate guest on the same 64-bit
> > > > Xubuntu Feisty host, kernel 2.6.20.3 Ubuntu branch, and kvm-22 (modules
> > > > and userspace). 
> > > > 
> > > > Any ideas? Have you guys done anything special to get Vista running?
> > > > What can I do to find out what's going on?
> > > > 
> > > 
> > > Well, all I did was to apply a one-line patch from Qing He to the bios
> > > ROM.  I haven't even tried Vista myself :)  Maybe Qing can comment?
> > > 
> > > It does look like a real mode problem; I'll update the dump to show
> > > more information (e.g. the code at the point of failure).
> > 
> > It's also possible that Vista did HLT (because we've got #GP) by finding
> > some feature missing. Dumping the instruction should be very helpful. 
> > 
> > > 
> > > Do you get anything in dmesg when the problem occurs?
> 
> I had some time on my hands lately and tried to debug this a little. I
> found that there's actually something showing in dmesg:
> 
> [ 3872.221039] emulation failed but !mmio_needed? rip 9a12 0f 09 66 25

This one looks the instruction WBINVD. I know it's missing in KVM. The x86_emulate.c needs be updated resyncing with the one in Xen. 

> 
> Does that help? I'm running kvm-24 now, but the exception still
> happens. I've been looking through x86_emulate.c and kvmctl.c trying
> to print more information but with no success yet.
> 
> Cheers,
> Jorge
> 


Jun
---
Intel Open Source Technology Center

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found]             ` <59abf66e0705222011l24200847sb39394630c692b67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2007-05-23  4:43               ` Nakajima, Jun
@ 2007-05-23 12:55               ` Avi Kivity
       [not found]                 ` <465439C5.1010506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2007-05-23 12:55 UTC (permalink / raw)
  To: Jorge Lucángeli Obes; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

Jorge Lucángeli Obes wrote:
> I had some time on my hands lately and tried to debug this a little. I
> found that there's actually something showing in dmesg:
>
> [ 3872.221039] emulation failed but !mmio_needed? rip 9a12 0f 09 66 25
>
> Does that help? I'm running kvm-24 now, but the exception still
> happens. I've been looking through x86_emulate.c and kvmctl.c trying
> to print more information but with no success yet.
>   

Does the attached patch help?  It implements 0f 09, wbinvd.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


[-- Attachment #2: wbinvd.patch --]
[-- Type: text/x-patch, Size: 768 bytes --]

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 7ade090..6123c02 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -152,7 +152,7 @@ static u8 opcode_table[256] = {
 static u16 twobyte_table[256] = {
 	/* 0x00 - 0x0F */
 	0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0,
-	0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0,
+	0, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0,
 	/* 0x10 - 0x1F */
 	0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x20 - 0x2F */
@@ -1304,6 +1304,8 @@ twobyte_special_insn:
 	/* Disable writeback. */
 	dst.orig_val = dst.val;
 	switch (b) {
+	case 0x09:		/* wbinvd */
+		break;
 	case 0x0d:		/* GrpP (prefetch) */
 	case 0x18:		/* Grp16 (prefetch/nop) */
 		break;

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: kvm-22 and Vista support
       [not found]                 ` <465439C5.1010506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-05-23 15:17                   ` Jorge Lucángeli Obes
       [not found]                     ` <59abf66e0705230817g1cdd8478vd9526d0754414f59-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Jorge Lucángeli Obes @ 2007-05-23 15:17 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 5/23/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> Jorge Lucángeli Obes wrote:
> > I had some time on my hands lately and tried to debug this a little. I
> > found that there's actually something showing in dmesg:
> >
> > [ 3872.221039] emulation failed but !mmio_needed? rip 9a12 0f 09 66 25
> >
> > Does that help? I'm running kvm-24 now, but the exception still
> > happens. I've been looking through x86_emulate.c and kvmctl.c trying
> > to print more information but with no success yet.
> >
>
> Does the attached patch help?  It implements 0f 09, wbinvd.

It actually did! I still cannot get to the login prompt, but there's
no more Exception 13. Now I get:

tamsyn@rory:~$ sudo qemu-system-x86_64 -localtime -no-rtc -no-reboot
-m 512 stuff/qemu/vista.img
Bus error

That's the same thing I get with kvm-25, which I found has the above
patch applied (or something equivalent). I'm able to catch a glimpse
of what I think is Vista's bootloader and then QEMU/KVM exits with the
above error. It sounded like a QEMU error to me, but it doesn't happen
when running with '-no-kvm'.

I still don't get a login prompt when running plain QEMU (it stops
halfway through the boot process - I've not looked deep into that),
but nonetheless I get further than with QEMU/KVM. Any ideas?

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: kvm-22 and Vista support
       [not found]                     ` <59abf66e0705230817g1cdd8478vd9526d0754414f59-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-05-24  2:56                       ` Jorge Lucángeli Obes
  0 siblings, 0 replies; 9+ messages in thread
From: Jorge Lucángeli Obes @ 2007-05-24  2:56 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> > Does the attached patch help?  It implements 0f 09, wbinvd.
>
> It actually did! I still cannot get to the login prompt, but there's
> no more Exception 13. Now I get:
>
> tamsyn@rory:~$ sudo qemu-system-x86_64 -localtime -no-rtc -no-reboot
> -m 512 stuff/qemu/vista.img
> Bus error
>
> That's the same thing I get with kvm-25, which I found has the above
> patch applied (or something equivalent). I'm able to catch a glimpse
> of what I think is Vista's bootloader and then QEMU/KVM exits with the
> above error. It sounded like a QEMU error to me, but it doesn't happen
> when running with '-no-kvm'.
>
> I still don't get a login prompt when running plain QEMU (it stops
> halfway through the boot process - I've not looked deep into that),
> but nonetheless I get further than with QEMU/KVM. Any ideas?

I messed up earlier... kvm-25 _does_ need Avi's patch in order not to
show the exception. Nonetheless, I managed to find the operation
generating the "Bus error".

Program received signal SIGBUS, Bus error.
[Switching to Thread 47144860629504 (LWP 5096)]
ldl_phys (addr=4093) at ../cpu-all.h:322
322         return *(uint32_t *)ptr;
(gdb) bt
#0  ldl_phys (addr=4093) at ../cpu-all.h:322
#1  0x000000000047e99d in kvm_readl (opaque=0x9f, addr=159, data=0x2ae0f551b028)
    at /home/tamsyn/local/kvm-25/qemu/qemu-kvm.c:568
#2  0x00000000004de1a3 in handle_mmio (kvm=0x2922010,
kvm_run=0x2ae0f551b000) at kvmctl.c:768
#3  0x00000000004de890 in kvm_run (kvm=0x2922010, vcpu=0) at kvmctl.c:971
#4  0x000000000047e7c3 in kvm_cpu_exec (env=0x29c4330) at
/home/tamsyn/local/kvm-25/qemu/qemu-kvm.c:469
#5  0x000000000047fb4a in cpu_x86_exec (env1=0x9f) at
/home/tamsyn/local/kvm-25/qemu/cpu-exec.c:411
#6  0x000000000040c1ba in main_loop () at
/home/tamsyn/local/kvm-25/qemu/vl.c:6272
#7  0x000000000040db91 in main (argc=7699712, argv=0x29220f0) at
/home/tamsyn/local/kvm-25/qemu/vl.c:7730

That is:

320: static inline int ldl_le_p(void *ptr)
321: {
322:     return *(uint32_t *)ptr;
323: }

However, there's a comment in cpu-all.h that reads:

 *   le   : little endian (not implemented yet)

I find that odd... there's something not implemented that appears as a
function and gets called? Maybe the comment is deprecated. Any ideas?

Cheers,
Jorge

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

end of thread, other threads:[~2007-05-24  2:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07  5:58 kvm-22 and Vista support Jorge Lucángeli Obes
     [not found] ` <59abf66e0705062258m54949118n26c8a24c55d0322c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-07  7:52   ` Avi Kivity
     [not found]     ` <463EDAC3.80601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-08  3:37       ` He, Qing
2007-05-08  4:52       ` Nakajima, Jun
     [not found]         ` <8FFF7E42E93CC646B632AB40643802A802941AE2-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-23  3:11           ` Jorge Lucángeli Obes
     [not found]             ` <59abf66e0705222011l24200847sb39394630c692b67-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-23  4:43               ` Nakajima, Jun
2007-05-23 12:55               ` Avi Kivity
     [not found]                 ` <465439C5.1010506-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-23 15:17                   ` Jorge Lucángeli Obes
     [not found]                     ` <59abf66e0705230817g1cdd8478vd9526d0754414f59-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-24  2:56                       ` Jorge Lucángeli Obes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox