]> git.ipfire.org Git - thirdparty/qemu.git/commit
qxl: don't assert() if device isn't yet initialized
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 14 Aug 2023 19:33:30 +0000 (23:33 +0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Sep 2023 16:40:11 +0000 (19:40 +0300)
commit5929f5309194e46f40b20aa07797f531663e323f
tree291380901dcc4e5db0e151bd5ca66a93ed6e959f
parentc68b844d3376764240afdb3c55d451e4dac11004
qxl: don't assert() if device isn't yet initialized

If the PCI BAR isn't yet mapped or was unmapped, QXL_IO_SET_MODE will
assert(). Instead, report a guest bug and keep going.

This can be reproduced with:

cat << EOF | ./qemu-system-x86_64 -vga qxl -m 2048 -nodefaults -qtest stdio
outl 0xcf8 0x8000101c
outl 0xcfc 0xc000
outl 0xcf8 0x80001001
outl 0xcfc 0x01000000
outl 0xc006 0x00
EOF

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1829
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 95bef686e490bc3afc3f51f5fc6e20bf260b938c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/display/qxl.c