0

qemu version is 7.1.0
I use qemu to simulate xlnx-zcu102. my qemu command is below, it can run OK:
./qemu-system-aarch64 -M xlnx-zcu102 -smp 4 -m 4G ......

but, when I add -device virtio-gpu or -device virtio-gpu-device,
(I added only one device: virtio-gpu)
qemu tell me ERROR like this:
qemu-system-aarch64: -device virtio-gpu: No 'PCI' bus found for device 'virtio-gpu-pci'

I don't know how to add a virtio-gpu device to xlnx-zcu102 in qemu command.

1 Answers1

0

You can't add that device to that machine type. The xlnx-zcu102 machine type simulates a piece of real hardware that does not have a PCI bus, and so you cannot plug PCI devices into it. You need to either use a different machine type, or else not use virtio devices.

Peter Maydell
  • 9,707
  • 1
  • 19
  • 25
  • I change a machine, use qemu-system-x86_64 -machine q35 it can run with a device virtio-gpu. But, when I use the device "virtio-gpu-gl", qemu tells me ERROR: qemu-system-x86_64: -device virtio-gpu-gl: opengl is not available. Actually, I configure the qemu with --enable-sdl --enable-opengl --enable-virglrenderer. how do i use the device : virtio-gpu-gl ? thanks – little_sand Nov 26 '22 at 16:21
  • when I use option :-device virtio-gpu-gl -display sdl,gl=on. qemu tell me ERROR: qemu-system-x86_64: ../ui/console-gl.c:105: surface_gl_update_texture: Assertion `gls' failed. i am confused – little_sand Nov 26 '22 at 16:47