qemu crashes with VGA pass-through, e-GPU, nvidia 1060
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
I try to pass-through nvidia 1060 6gb card, which is connected via ExpressCard (EXP-GDC converter).
I can successfully run my virtual machine without pass-through, but when I try to add the devices, qemu crashes.
The coredump contains:
Stack trace of thread 3289311:
#0 0x0000000000614c49 memory_
#1 0x00000000005c0e8c vfio_probe_
#2 0x00000000005bcec0 vfio_realize (qemu-system-x86_64 + 0x1bcec0)
#3 0x000000000079b423 pci_qdev_realize (qemu-system-x86_64 + 0x39b423)
#4 0x00000000006facda device_set_realized (qemu-system-x86_64 + 0x2facda)
#5 0x0000000000887e57 property_set_bool (qemu-system-x86_64 + 0x487e57)
#6 0x000000000088ac48 object_property_set (qemu-system-x86_64 + 0x48ac48)
#7 0x000000000088d1d2 object_
#8 0x000000000088b1f7 object_
#9 0x0000000000693785 qdev_device_add (qemu-system-x86_64 + 0x293785)
#10 0x000000000061aad0 device_init_func (qemu-system-x86_64 + 0x21aad0)
#11 0x000000000098c87b qemu_opts_foreach (qemu-system-x86_64 + 0x58c87b)
#12 0x00000000006211cb qemu_init (qemu-system-x86_64 + 0x2211cb)
#13 0x00000000005002aa main (qemu-system-x86_64 + 0x1002aa)
#14 0x00007fce8af21152 __libc_start_main (libc.so.6 + 0x28152)
#15 0x000000000050087e _start (qemu-system-x86_64 + 0x10087e)
The whole running command is pretty long, since I use libvirt to manage my machines:
LC_ALL=C \
PATH=/usr/
HOME=/var/
XDG_DATA_
XDG_CACHE_
XDG_CONFIG_
QEMU_AUDIO_
/usr/bin/
-name guest=Win10,
-S \
-blockdev '{"driver"
-blockdev '{"node-
-blockdev '{"driver"
-blockdev '{"node-
-machine pc-q35-
-cpu host,migratable
-m 8192 \
-overcommit mem-lock=off \
-smp 2,sockets=
-uuid 7043c77b-
-no-user-config \
-nodefaults \
-chardev stdio,mux=
-mon chardev=
-rtc base=localtime,
-global kvm-pit.
-no-hpet \
-no-shutdown \
-global ICH9-LPC.
-global ICH9-LPC.
-boot strict=on \
-device pcie-root-
-device pcie-root-
-device pcie-root-
-device pcie-root-
-device pcie-root-
-device pcie-root-
-device qemu-xhci,
-device virtio-
-blockdev '{"driver"
-blockdev '{"node-
-device ide-hd,
-blockdev '{"driver"
-blockdev '{"node-
-device ide-cd,
-chardev pty,id=charserial0 \
-device isa-serial,
-chardev spicevmc,
-device virtserialport,
-spice port=5900,
-device qxl-vga,
-chardev spicevmc,
-device usb-redir,
-chardev spicevmc,
-device usb-redir,
-device vfio-pci,
-device vfio-pci,
-device virtio-
-sandbox on,obsolete=
-msg timestamp=on
I've forced vfio_pci module for the VGA, and ensured that lspci shows
Kernel driver in use: vfio_pci
My laptop is Thinkpad x230, that runs on Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz.
I run 5.8.6-1-MANJARO kernel and run QEMU emulator version 5.1.0.
Thank you for your attention. I'd love to provide more information, but I don't know what else matters.
Please attach output from `dmesg` and `sudo lspci -vvv`, both from the host. Laptops typically don't provide sufficient resources for GPUs attached like this, so my guess is that we're trying to add a quirk on top of a BAR that isn't mapped. If that's the case, the following host kernel options might help: pci=realloc, assign- busses, nocrs