[libvirt] qemu qxl video memory parameter - windows bsod with spice

Hi, Please see the below discussion with the spice community. libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes. I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory. The parameter that qemu gets with one qxl device is: -vga qxl -global qxl-vga.vram_size=9437184 The parameter that qemu gets with a second qxl device is: -vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8 Is this a bug in libvirt or other related tools? Thanks, Br, Emre ---------- Forwarded message ---------- From: Emre Erenoglu <erenoglu@gmail.com> Date: Wed, May 4, 2011 at 7:42 PM Subject: Re: [Spice-devel] windows bsod with spice 0.8.1 To: Emre Erenoglu <erenoglu@gmail.com>, spice-devel@freedesktop.org On Wed, May 4, 2011 at 6:00 PM, Alon Levy <alevy@redhat.com> wrote:
On Wed, May 4, 2011 at 2:12 PM, Alon Levy <alevy@redhat.com> wrote:
On Wed, May 04, 2011 at 01:45:39PM +0400, Emre Erenoglu wrote:
On Wed, Apr 27, 2011 at 1:16 AM, Emre Erenoglu <erenoglu@gmail.com> wrote:
Hi,
I started to see frequent crashes with my guests running windows xp and windows server 2003 x86. The bsod appears on qxldd.dll. I can give further info if needed.
The host is Linux x86_64, qemu 0.14, spice 0.8.1. Guest has qxl 0.6.1 drivers loaded. I may revert back to 0.8.0 since it was not crashing. Nothing changed in the guests when I upgraded spice from 0.8.0 to 0.8.1.
Some updates on the original issue. I checked a lot and I found out
issue continued with any version of spice and guest qxl drivers.
I finally digged down to the point that, the qemu comment line which states " -global qxl-vga.vram_size=9xxxxxx " parameter is the problem. When
guest is started with 9 MB of video memory given as comment line
the the parameter
to qemu, the guest qxldd driver crashes with BSOD.
Why was it started with 9MB? anyway, good catch, we should add a check for this in the driver (and probably just refuse to load). Could you open a bug on this in bugzilla.freedesktop.org?
This is added by libvirt (virt-manager) when launching qemu. Do we need to file it against libvirt or against spice? I will post this to the
list also.
Btw, rather than refusing to load, I think we should just limit the
On Wed, May 04, 2011 at 05:10:31PM +0400, Emre Erenoglu wrote: that libvirt possible
resolutions. I'm not sure if the resolutions are the issue though. The crash was not happening immediately and it was working OK with that 9 MB memory. When I launched outlook, or IE8, or just in the middle of an application, it could crash and bsod.
But that number doesn't make any sense - the spice default is 64MB, we never tested with less then that. It is probably fixable like you say, but until that's fixed why not stick to the spice default?
Well, this parameter is not configurable from the virt-manager UI and it configures 9 MB to the command line of qemu by libvirt (even latest 0.9.0) version. When you add a 2nd VGA adapter, it adds 64 MB to that adapter correctly (-device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8) I guess i need to file a bug report to libvirt too. Emre

On Wed, May 04, 2011 at 07:52:37PM +0400, Emre Erenoglu wrote:
Hi,
Please see the below discussion with the spice community.
libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes.
I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory.
The parameter that qemu gets with one qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184
The parameter that qemu gets with a second qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8
Is this a bug in libvirt or other related tools?
libvirt allows arbitrary RAM specification for QXL, so I think it is probably a virt-manager issue. When changing the display type from cirrus -> qxl, virt-manager should probably just remove any RAM attribute in the XML and let libvirt re-assign the default setting Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 05/04/2011 12:05 PM, Daniel P. Berrange wrote:
On Wed, May 04, 2011 at 07:52:37PM +0400, Emre Erenoglu wrote:
Hi,
Please see the below discussion with the spice community.
libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes.
I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory.
The parameter that qemu gets with one qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184
The parameter that qemu gets with a second qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8
Is this a bug in libvirt or other related tools?
libvirt allows arbitrary RAM specification for QXL, so I think it is probably a virt-manager issue. When changing the display type from cirrus -> qxl, virt-manager should probably just remove any RAM attribute in the XML and let libvirt re-assign the default setting
Fixed in virt-manager now:

On 05/04/2011 12:05 PM, Daniel P. Berrange wrote:
On Wed, May 04, 2011 at 07:52:37PM +0400, Emre Erenoglu wrote:
Hi,
Please see the below discussion with the spice community.
libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes.
I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory.
The parameter that qemu gets with one qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184
The parameter that qemu gets with a second qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8
Is this a bug in libvirt or other related tools?
libvirt allows arbitrary RAM specification for QXL, so I think it is probably a virt-manager issue. When changing the display type from cirrus -> qxl, virt-manager should probably just remove any RAM attribute in the XML and let libvirt re-assign the default setting
Fixed in virt-manager now: http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=7a8a35e564b8c4... Thanks, Cole

On Wed, May 4, 2011 at 6:05 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Wed, May 04, 2011 at 07:52:37PM +0400, Emre Erenoglu wrote:
Hi,
Please see the below discussion with the spice community.
libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes.
I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory.
The parameter that qemu gets with one qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184
The parameter that qemu gets with a second qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8
Is this a bug in libvirt or other related tools?
libvirt allows arbitrary RAM specification for QXL, so I think it is probably a virt-manager issue. When changing the display type from cirrus -> qxl, virt-manager should probably just remove any RAM attribute in the XML and let libvirt re-assign the default setting
Daniel
Actually on my Fedora 14 + virt-preview repo, that comes with a lower libvirt version, in particular: qemu-kvm-0.14.0-7.fc14.x86_64 virt-manager-0.8.7-3.fc14.noarch libvirt-0.8.8-4.fc14.x86_64 I do have in virt-manager inside the section "video": Model: qxl RAM: 9MB (not changeable, like a note) Heads:1 but my qemu-kvm line for a w2k3 32bit guest is: [ ~]$ ps -ef|grep qemu qemu 17973 1 24 18:11 ? 00:49:12 /usr/bin/qemu-kvm -S -M fedora-13 -cpu core2duo,+x2apic -enable-kvm -m 1536 -smp 1,sockets=1,cores=1,threads=1 -name w2k3 -uuid 5ee312e2-2e2e-4503-f1c2-749592bb6ca8 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/w2k3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/f13/var/lib/libvirt/images/w2k3new.img,if=none,id=drive-ide0-0-1,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=21,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:ff:61:63,bus=pci.0,addr=0x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -usb -device usb-tablet,id=input0 -spice port=5901,tls-port=5902,addr=127.0.0.1,disable-ticketing,x509-dir=/etc/pki/libvirt-spice -vga qxl -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 So the -qxl part doesn't get the "-global qxl-vga.vram_size" option set at all..... Does this mean that it gets the default 64Mb? Perhaps a regression in 0.9.0? Gianluca

On Wed, May 4, 2011 at 11:40 PM, Gianluca Cecchi <gianluca.cecchi@gmail.com>wrote:
On Wed, May 4, 2011 at 6:05 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Wed, May 04, 2011 at 07:52:37PM +0400, Emre Erenoglu wrote:
Hi,
Please see the below discussion with the spice community.
libvirt is adding a parameter about video ram to qemu process and this parameter might be responsible of a crash in the qxl at higher resolutions. Spice people tell me that their default ram should be 64 Mbytes.
I'm using libvirt 0.9.0 and qemu 0.14, virt-manager 0.8.7. When configuring a guest in virt-manager, cirrus driver is added as default, then you can change it to qxl, but the 9 MB videoram parameter can't be adjusted and it does not automatically change to 64 MB. If you add a 2nd qxl video card, then it has 64 MB memory.
The parameter that qemu gets with one qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184
The parameter that qemu gets with a second qxl device is:
-vga qxl -global qxl-vga.vram_size=9437184 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x8
Is this a bug in libvirt or other related tools?
libvirt allows arbitrary RAM specification for QXL, so I think it is probably a virt-manager issue. When changing the display type from cirrus -> qxl, virt-manager should probably just remove any RAM attribute in the XML and let libvirt re-assign the default setting
Daniel
Actually on my Fedora 14 + virt-preview repo, that comes with a lower libvirt version, in particular: qemu-kvm-0.14.0-7.fc14.x86_64 virt-manager-0.8.7-3.fc14.noarch libvirt-0.8.8-4.fc14.x86_64
I do have in virt-manager inside the section "video": Model: qxl RAM: 9MB (not changeable, like a note) Heads:1
but my qemu-kvm line for a w2k3 32bit guest is: [ ~]$ ps -ef|grep qemu qemu 17973 1 24 18:11 ? 00:49:12 /usr/bin/qemu-kvm -S -M fedora-13 -cpu core2duo,+x2apic -enable-kvm -m 1536 -smp 1,sockets=1,cores=1,threads=1 -name w2k3 -uuid 5ee312e2-2e2e-4503-f1c2-749592bb6ca8 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/w2k3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/f13/var/lib/libvirt/images/w2k3new.img,if=none,id=drive-ide0-0-1,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=21,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:ff:61:63,bus=pci.0,addr=0x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -usb -device usb-tablet,id=input0 -spice
port=5901,tls-port=5902,addr=127.0.0.1,disable-ticketing,x509-dir=/etc/pki/libvirt-spice -vga qxl -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
So the -qxl part doesn't get the "-global qxl-vga.vram_size" option set at all..... Does this mean that it gets the default 64Mb? Perhaps a regression in 0.9.0?
I don't know, I use the latest versions only. The upstream sent a patch and I checked it against virt-manager 0.8.7, works perfectly! -- Emre
participants (4)
-
Cole Robinson
-
Daniel P. Berrange
-
Emre Erenoglu
-
Gianluca Cecchi