x11-drivers/xf86-video-qxl - Segmentation fault and bus error with QEMU

I recently installed FreeBSD 14.3 in a QEMU instance. When I use the default setup from Xorg -configure (uses the spiceqxl driver), I get an segmentation fault in the following code snippet:

src/spiceqxl_io_port.c:

C:
void xspice_init_qxl_ram(qxl_screen_t *qxl)
{
    QXLRam *ram = get_ram_header(qxl);
    uint64_t *item;

    ram->magic       = QXL_RAM_MAGIC;    // <== Segfaults here
    ram->int_pending = 0;
    ram->int_mask    = 0;
    SPICE_RING_INIT(&ram->cmd_ring);
    SPICE_RING_INIT(&ram->cursor_ring);
    SPICE_RING_INIT(&ram->release_ring);
    SPICE_RING_PROD_ITEM(&ram->release_ring, item);
    *item = 0;
}

And when I use qxl instead I receive an bus error in Xorg.

I start the FreeBSD QEMU instance as follows:
Code:
$ qemu-system-x86_64 -smp 2 -m 4G -cpu host -machine q35 -display sdl,gl=on -vga qxl -audio driver=sdl,model=hda -usb -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::8383-:22 --enable-kvm -hda disk_fbsd.img

Has somebody noticed the same issue?
 
I noticed a kernel PANIC with FreeBSD 14.3 when trying to start FreeBSD with the following QEMU command:
Code:
$ qemu-system-x86_64 -smp 2 -m 4G -cpu host -machine q35 -display gtk,gl=on -device virtio-gpu-gl-pci -audio driver=sdl,model=hda -usb -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::8383-:22 --enable-kvm -hda disk_fbsd.img

The issue exists when I use the option -display gtk,gl=on with the device virtio-gpu-gl-pci with -display,gl=on and the same device I get an QEMU error message. Seems something wrong with QEMU.

Here a screenshot from the Kernel PANIC:
Screenshot_FBSD_panic.png
 
Somewhat split between "Emulation and Virtualization" (as this issue might be related to Qemu), and "Display servers" (it's an Xorg and X driver issue). Lets try "Display servers" first.

Added another post, at first glance looks like a similar issue, common denominator seems to be Qemu.
 
Back
Top