graphic: 0.992 x86: 0.984 debug: 0.972 device: 0.966 PID: 0.900 peripherals: 0.882 mistranslation: 0.858 i386: 0.814 performance: 0.812 ppc: 0.802 hypervisor: 0.780 semantic: 0.751 network: 0.740 virtual: 0.733 vnc: 0.727 architecture: 0.725 boot: 0.725 VMM: 0.708 socket: 0.666 risc-v: 0.635 files: 0.605 TCG: 0.574 kernel: 0.565 register: 0.535 arm: 0.524 KVM: 0.475 permissions: 0.435 user-level: 0.425 assembly: 0.339 Virtio-vga with blobs on fails, when qemu compiled with enabled modules Description of problem: When using qemu configured with `--enabled-modules` and starting qemu with command line above, qemu crashes with following output: ``` qemu-system-x86_64: -device virtio-vga,blob=on: cannot enable blob resources without udmabuf ``` While qemu configured without `--enabled-modules` runs this command successfully. Steps to reproduce: 1. Get latest qemu source code 2. Build qemu `mkdir build && cd build && ../configure && ninja` 3. Check if following command runs without errors and show sdl qemu window ``` sudo ./qemu-system-x86_64 \ -object memory-backend-memfd,id=mem1,size=512M \ -machine memory-backend=mem1 \ -display sdl \ -device virtio-vga,blob=on ``` 4. Then try to build with modules enabled `mkdir build && cd build && ../configure --enable-modules && ninja` 5. Try to do step 3 again Additional information: I tried to debug this bug, and found that problem is with function `virtio_gpu_have_udmabuf`: when qemu is build without modules this function is from `hw/display/virtio-gpu-udmabuf.c` (which is correct), but when qemu compiled with modules this function comes from `stubs/virtio-gpu-udmabuf.c` and when `hw-display-virtio-gpu.so` is loaded, `virtio_gpu_have_udmabuf` is not replaced, and remains function from stub (which always return 0) and command fails. I think I will submit patch that fix it tomorrow