Discussion:
[Spice-devel] settings for qxl memory size
Davide Canova
2013-01-03 11:21:11 UTC
Permalink
I'm trying qxl with xen, qemu 1.3 and spice 0.12.2, and I get this error:
Spice-CRITICAL **: red_memslots.c:123:get_virt: slot_id 194 too big,
addr=c2c2c2c2c2c2c2c2

Is there any setting for the qxl memory size? I can't find any
detailed and updated documentation about it.

I'm trying different settings to see if something changes, but it doesn't, e.g.
device_model_args=["-global","qxl-vga.ram_size_mb=8","-global","qxl-vga.vram_size_mb=8","-global","vga.vgamem_size_mb=8"]

How can I find out the total videoram used, so that I can make xen
reserve the right amount? My xen is patched for qxl. If I understand
correctly the patch reserves 128 extra mb for the videoram and it sets
-vga qxl.

Thanks,
DC
Alon Levy
2013-01-15 09:26:08 UTC
Permalink
Post by Davide Canova
Spice-CRITICAL **: red_memslots.c:123:get_virt: slot_id 194 too big,
addr=c2c2c2c2c2c2c2c2
That's a bug in the driver/device/spice_server (but I guess driver &
device, i.e. qemu of xen), that address is way too big for anything, and
looks like garbage anyway. The slot id is taken from the first few bits
and is not a registered slot. The driver registers slots and all
QXLPHYSICAL addresses, like those in the commands that are pushed via
the command ring, have to match.
Post by Davide Canova
Is there any setting for the qxl memory size? I can't find any
detailed and updated documentation about it.
I'm trying different settings to see if something changes, but it doesn't, e.g.
device_model_args=["-global","qxl-vga.ram_size_mb=8","-global","qxl-vga.vram_size_mb=8","-global","vga.vgamem_size_mb=8"]
All of the above work, and also:
$ qemu-system-x86_64 -device qxl-vga,? 2>&1 | grep size
qxl-vga.ram_size=uint32
qxl-vga.vram_size=uint32
qxl-vga.ram_size_mb=uint32
qxl-vga.vram_size_mb=uint32
qxl-vga.vram64_size_mb=uint32
Post by Davide Canova
How can I find out the total videoram used, so that I can make xen
reserve the right amount? My xen is patched for qxl. If I understand
correctly the patch reserves 128 extra mb for the videoram and it sets
-vga qxl.
I have no clue about the patched version, I don't use it and haven't
seen it, but there are two bars, called ram and vram in the command line
options, so the total memory is approximately (since there is also a
small io bar and a small rom bar, but they are negligble) the sum of
both. They default to 64MiB each. (MB is used to mean MiB everywhere in
the command line, i.e. ram_size_mb).
Post by Davide Canova
Thanks,
DC
_______________________________________________
Spice-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/spice-devel
Davide Canova
2013-01-18 18:16:37 UTC
Permalink
Thanks for your reply,
I did more tests with this new patch for qxl, but it still doesn't work:
http://lists.xen.org/archives/html/xen-devel/2013-01/msg01405.html

I get this error in the logs:

main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 55.458000 ms, bitrate
680172700 bps (648.663235 Mbps)
red_dispatcher_set_cursor_peer:
inputs_connect: inputs channel client create
id 0, group 0, virt start 0, virt end ffffffffffffffff, generation 0, delta 0
id 1, group 1, virt start 7f2fcf657000, virt end 7f2fd0655000,
generation 0, delta 7f2fcf657000
id 2, group 1, virt start 7f2fce42d000, virt end 7f2fce43d000,
generation 0, delta 7f2fce42d000
(/usr/sbin/xl:5207): Spice-CRITICAL **:
red_memslots.c:94:validate_virt: virtual address out of range
virt=0x7f2fd0657398+0xbf slot_id=1 group_id=1
slot=0x7f2fcf657000-0x7f2fd0655000 delta=0x7f2fcf657000

I can provide more details or do more tests if useful.

Our test system is Debian Wheezy, with all packages from official
repository except seabios 1.7.1 from experimental, spice 0.12.2 and
spice-protocol 0.12.3 from experimental but recompiled, xen-unstable
(4.3) from source with patch.
We tried both qemu 1.3.0 from Xen repository and upstream unstable.
The client has spice-client-gtk 0.16, spice 0.12.2, spice-protocol
0.12.3 and usbredirection 0.6 installed.
The domU is Debian Wheezy (all packages from official repository)
started with these arguments:

---
Spawning device-model /usr/lib/xen/bin/qemu-system-i386 with arguments:
/usr/lib/xen/bin/qemu-system-i386
-xen-domid
6
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-6,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
WHEEZY
-k
it
-spice
port=6003,tls-port=0,addr=0.0.0.0,disable-ticketing,agent-mouse=on
-vga
qxl
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=c
-no-acpi
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:46:6b:4f
-netdev
type=tap,id=net0,ifname=vif6.0-emu,script=no,downscript=no
-device
virtio-serial-pci,id=virtio-serial0
-chardev
spicevmc,id=charchannel0,name=vdagent
-device
virtserialport,nr=1,bus=virtio-serial0.0,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-device
intel-hda,id=sound0
-device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/WHEEZY.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
---
Alon Levy
2013-01-18 18:18:42 UTC
Permalink
Post by Davide Canova
Thanks for your reply,
I did more tests with this new patch for qxl, but it still doesn't
http://lists.xen.org/archives/html/xen-devel/2013-01/msg01405.html
Hi Davide,

Perhaps you should ask on xen-devel? I am curios about this effort but I don't think anyone involved with it is on spice-devel. Maybe cross posting is in order?

Alon
Post by Davide Canova
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 55.458000 ms, bitrate
680172700 bps (648.663235 Mbps)
inputs_connect: inputs channel client create
id 0, group 0, virt start 0, virt end ffffffffffffffff, generation 0,
delta 0
id 1, group 1, virt start 7f2fcf657000, virt end 7f2fd0655000,
generation 0, delta 7f2fcf657000
id 2, group 1, virt start 7f2fce42d000, virt end 7f2fce43d000,
generation 0, delta 7f2fce42d000
red_memslots.c:94:validate_virt: virtual address out of range
virt=0x7f2fd0657398+0xbf slot_id=1 group_id=1
slot=0x7f2fcf657000-0x7f2fd0655000 delta=0x7f2fcf657000
I can provide more details or do more tests if useful.
Our test system is Debian Wheezy, with all packages from official
repository except seabios 1.7.1 from experimental, spice 0.12.2 and
spice-protocol 0.12.3 from experimental but recompiled, xen-unstable
(4.3) from source with patch.
We tried both qemu 1.3.0 from Xen repository and upstream unstable.
The client has spice-client-gtk 0.16, spice 0.12.2, spice-protocol
0.12.3 and usbredirection 0.6 installed.
The domU is Debian Wheezy (all packages from official repository)
---
Spawning device-model /usr/lib/xen/bin/qemu-system-i386 with
/usr/lib/xen/bin/qemu-system-i386
-xen-domid
6
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-6,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
WHEEZY
-k
it
-spice
port=6003,tls-port=0,addr=0.0.0.0,disable-ticketing,agent-mouse=on
-vga
qxl
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=c
-no-acpi
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:46:6b:4f
-netdev
type=tap,id=net0,ifname=vif6.0-emu,script=no,downscript=no
-device
virtio-serial-pci,id=virtio-serial0
-chardev
spicevmc,id=charchannel0,name=vdagent
-device
virtserialport,nr=1,bus=virtio-serial0.0,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-device
intel-hda,id=sound0
-device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/WHEEZY.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
---
Davide Canova
2013-01-23 15:58:32 UTC
Permalink
Hi,
we have been posting all our results on xen-devel too, but we haven't
made any progress by now. We are trying to narrow down the problem as
much as possible so that we can ask the right question at the right
place, any advice is welcome (eg. what tests can be done).

Changing the debug level of spice I got this log in my last test:

qxl-0: ram/pri: 32 MB [region 0]
qxl-0: vram/32: 0 MB [region 1]
qxl-0: vram/64: 0 MB [unmapped]
(/usr/sbin/xl:3829): Spice-Warning **: reds.c:1923:reds_handle_ticket:
Invalid password
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 87.892000 ms, bitrate
603773584 bps (575.803360 Mbps)
red_channel_client_pre_create_validate: Error client 0x7fa8f7010170:
duplicate channel type 2 id 0
red_channel_client_pre_create_validate: Error client 0x7fa8f7010170:
duplicate channel type 2 id 0
inputs_connect: inputs channel client create
red_dispatcher_set_cursor_peer:
red_dispatcher_set_cursor_peer:
red_channel_client_pre_create_validate: Error client 0x7fa8f7010170:
duplicate channel type 4 id 0

Qemu invocation:

/usr/lib/xen/bin/qemu-system-i386
-xen-domid
2
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-2,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
W7
-k
it
-spice
port=6002,tls-port=0,addr=0.0.0.0,password=prova,agent-mouse=on
-device
qxl-vga
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=dc
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:49:bb:f1
-netdev
type=tap,id=net0,ifname=vif2.0-emu,script=no,downscript=no
--global
qxl-vga.debug=1
-global
qxl-vga.guestdebug=20
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/prova/W7.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
-drive
file=/mnt/vm/iso/XPSP3PRO.iso,if=ide,index=1,media=cdrom,format=raw,cache=writeback,id=ide-832
Alon Levy
2013-01-23 16:05:55 UTC
Permalink
Post by Davide Canova
Hi,
we have been posting all our results on xen-devel too, but we haven't
made any progress by now. We are trying to narrow down the problem as
much as possible so that we can ask the right question at the right
place, any advice is welcome (eg. what tests can be done).
qxl-0: ram/pri: 32 MB [region 0]
qxl-0: vram/32: 0 MB [region 1]
qxl-0: vram/64: 0 MB [unmapped]
Invalid password
Looks like the client isn't supplying the correct password set below. You can also disable passwords by the "disable-ticketing" option, i.e. "-spice disable-ticketing,..."
Post by Davide Canova
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 87.892000 ms, bitrate
603773584 bps (575.803360 Mbps)
duplicate channel type 2 id 0
duplicate channel type 2 id 0
inputs_connect: inputs channel client create
duplicate channel type 4 id 0
/usr/lib/xen/bin/qemu-system-i386
-xen-domid
2
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-2,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
W7
-k
it
-spice
port=6002,tls-port=0,addr=0.0.0.0,password=prova,agent-mouse=on
-device
qxl-vga
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=dc
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:49:bb:f1
-netdev
type=tap,id=net0,ifname=vif2.0-emu,script=no,downscript=no
--global
qxl-vga.debug=1
-global
qxl-vga.guestdebug=20
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/prova/W7.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
-drive
file=/mnt/vm/iso/XPSP3PRO.iso,if=ide,index=1,media=cdrom,format=raw,cache=writeback,id=ide-832
Davide Canova
2013-01-24 11:08:08 UTC
Permalink
Post by Alon Levy
Looks like the client isn't supplying the correct password set below. You can also disable passwords by the "disable-ticketing" option, i.e. "-spice disable-ticketing,..."
I didn't notice that warning, I should have disabled passwords for the
sake of posting, but I did many tests and I'm sure it's not a password
issue (I have the problem only with qxl enabled).

This is a log with passwords disabled:

qxl-0: ram/pri: 32 MB [region 0]
qxl-0: vram/32: 0 MB [region 1]
qxl-0: vram/64: 0 MB [unmapped]
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 38.945000 ms, bitrate
581983518 bps (555.022734 Mbps)
red_channel_client_pre_create_validate: Error client 0x7fe2d619a8f0:
duplicate channel type 2 id 0
inputs_connect: inputs channel client create
red_channel_client_pre_create_validate: Error client 0x7fe2d619a8f0:
duplicate channel type 2 id 0
red_dispatcher_set_cursor_peer:
red_dispatcher_set_cursor_peer:
red_channel_client_pre_create_validate: Error client 0x7fe2d619a8f0:
duplicate channel type 4 id 0

Is the amount of MB in the first 3 lines as expected? In another test
I tried 16M for both qxl-vga.ram_size and qxl-vga.vram_size but these
lines didn't change.

Qemu invocation:

/usr/lib/xen/bin/qemu-system-i386
-xen-domid
3
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-3,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
W7
-k
it
-spice
port=6002,tls-port=0,addr=0.0.0.0,disable-ticketing,agent-mouse=on
-device
qxl-vga
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=dc
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:1a:b4:74
-netdev
type=tap,id=net0,ifname=vif3.0-emu,script=no,downscript=no
--global
qxl-vga.debug=1
-global
qxl-vga.guestdebug=20
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/prova/W7.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
-drive
file=/mnt/vm/iso/XPSP3PRO.iso,if=ide,index=1,media=cdrom,format=raw,cache=writeback,id=ide-832
Alon Levy
2013-01-24 13:11:01 UTC
Permalink
Post by Davide Canova
Post by Alon Levy
Looks like the client isn't supplying the correct password set
below. You can also disable passwords by the "disable-ticketing"
option, i.e. "-spice disable-ticketing,..."
I didn't notice that warning, I should have disabled passwords for
the
sake of posting, but I did many tests and I'm sure it's not a
password
issue (I have the problem only with qxl enabled).
qxl-0: ram/pri: 32 MB [region 0]
qxl-0: vram/32: 0 MB [region 1]
qxl-0: vram/64: 0 MB [unmapped]
main_channel_link: add main channel client
main_channel_handle_parsed: net test: latency 38.945000 ms, bitrate
581983518 bps (555.022734 Mbps)
duplicate channel type 2 id 0
inputs_connect: inputs channel client create
duplicate channel type 2 id 0
duplicate channel type 4 id 0
Is the amount of MB in the first 3 lines as expected? In another test
I tried 16M for both qxl-vga.ram_size and qxl-vga.vram_size but these
lines didn't change.
No, it isn't, good that you noticed (bad that I didn't). vram/64 can be (should be - no driver knows how to map it yet unless you changed it) zero but vram/32 should be > 0. How are the bars allocated? is it seabios or something else? if seabios can you enable debugging messages by adding the following to qemu command line (again - this is upstream, I have no idea how it works with xen): -chardev
stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios
Post by Davide Canova
/usr/lib/xen/bin/qemu-system-i386
-xen-domid
3
-chardev
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-3,server,nowait
-mon
chardev=libxl-cmd,mode=control
-name
W7
-k
it
-spice
port=6002,tls-port=0,addr=0.0.0.0,disable-ticketing,agent-mouse=on
-device
qxl-vga
-global
qxl-vga.vram_size=65536
-global
qxl-vga.ram_size=65536
-boot
order=dc
-smp
2,maxcpus=2
-device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:1a:b4:74
-netdev
type=tap,id=net0,ifname=vif3.0-emu,script=no,downscript=no
--global
qxl-vga.debug=1
-global
qxl-vga.guestdebug=20
-M
xenfv
-m
1920
-drive
file=/mnt/vm/disks/prova/W7.disk1.xm,if=ide,index=0,media=disk,format=raw,cache=writeback
-drive
file=/mnt/vm/iso/XPSP3PRO.iso,if=ide,index=1,media=cdrom,format=raw,cache=writeback,id=ide-832
Davide Canova
2013-01-24 21:13:59 UTC
Permalink
Post by Alon Levy
Post by Davide Canova
Is the amount of MB in the first 3 lines as expected? In another test
I tried 16M for both qxl-vga.ram_size and qxl-vga.vram_size but these
lines didn't change.
No, it isn't, good that you noticed (bad that I didn't). vram/64 can be (should be - no driver knows how to map it yet unless you changed it) zero but vram/32 should be > 0. How are the bars allocated? is it seabios or something else? if seabios can you enable debugging messages by adding the following to qemu command line (again - this is upstream, I have no idea how it works with xen): -chardev
stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios
Yes, it is seabios, but I can't pass those arguments: qemu invocation
fails with "qemu-system-i386: -chardev stdio,id=seabios: invalid
option". I tried both qemu 1.3.0 and 1.4 from git. I'm trying to
understand if the problem is in the interaction with xen.
I'll post the debugging messages as soon as it works, thanks,
DC

Loading...