[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Qemu-devel] Cirrus VGA slow screen update, show blank screen last 13s or so for windows XP guest



Il 26/07/2013 08:41, Gonglei (Arei) ha scritto:

-----Original Message-----
From: Anthony Liguori [mailto:anthony@xxxxxxxxxxxxx]
Sent: Friday, July 26, 2013 11:21 AM
To: Gonglei (Arei)
Cc: qemu-devel@xxxxxxxxxx; xen-devel@xxxxxxxxxxxxx; Hanweidong;
Luonengjun; Huangweidong (Hardware)
Subject: Re: [Qemu-devel] Cirrus VGA slow screen update, show blank screen
last 13s or so for windows XP guest

  On Thu, Jul 25, 2013 at 10:08 PM, Gonglei (Arei)
<arei.gonglei@xxxxxxxxxx> wrote:
-----Original Message-----
From: Anthony Liguori [mailto:anthony@xxxxxxxxxxxxx]
Sent: Friday, July 26, 2013 10:09 AM
To: Gonglei (Arei)
Cc: qemu-devel@xxxxxxxxxx; xen-devel@xxxxxxxxxxxxx; Hanweidong;
Luonengjun; Huangweidong (Hardware)
Subject: Re: [Qemu-devel] Cirrus VGA slow screen update, show blank
screen
last 13s or so for windows XP guest

Windows XP uses VGA planar mode during boot up.   This means that to
set a pixel requires 3 MMIO operations (one for the red pixel, one for
the green pixel, one for the blue pixel).  KVM has an optimization
called MMIO coalescing which avoids a heavy weight exit for planar
mode exits.  I guess Xen doesn't have an optimization like this.

Regards,

Anthony Liguori
Thanks, Anthony.
I tested the Windows XP guest again on KVM and XEN, and I found:
1. Windows XP will show blank screen during boot up as the same as
  the protocol switch between VNC and RDP.
2. Standard VGA works well, what's difference between cirrus and standard
VGA for the guest?

Cirrus predates VESA.  VESA has a linear framebuffer mode and WinXP
can use VESA modes (provided that VESA drivers are installed).  A
linear framebuffer mode requires no exits to update individual pixels.
  Instead, there is a timer that fires 30-60 times a second to handle
any pixels that have been dirtied during that period.

3. Why does the traditional qemu has no blank screen problem on cirrus VGA
emulation ?

This is one of the few cases where TCG is actually faster than KVM or
Xen.  In TCG, an MMIO exit is converted to a function call.  OTOH,
even with KVM, an MMIO exit is at least a couples thousand cycles.
It's worse with Xen because dom0 has to be scheduled.
Perhaps I did not express clearly what I mean at #3.
I don't understand why the qemu-dm(qemu-0.10.2) works well
but the upstream qemu(begin with qemu-0.14) is not for the
same windows XP guest image in cirrus vga emulation. Does
the cirrus vga emulation have some differences between
qemu-dm and unstream qemu ?

Probably can be useful try to see here:
https://github.com/xenserver/qemu-xen-4.2.pg/tree/master/master
Probably there are one or more patches not upstreamed that can solve one or more problems.


Thank you so much!

-Gonglei
If you search a bit for the V2E project, there was an attempt to
combine TCG emulation with hardware virtualization specifically to
handle cases like this.  Coalesced MMIO was good enough for KVM though
that something like V2E wasn't  pursued for KVM.

Regards,

Anthony Liguori

Eagerly looking forward to your reply!

-Gonglei

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.