diff mbox series

[Bug,1897481] Re: qemu crashes with VGA pass-through, e-GPU, nvidia 1060

Message ID 160147877482.24881.11249970993995586313.malone@chaenomeles.canonical.com
State New
Headers show
Series [Bug,1897481] Re: qemu crashes with VGA pass-through, e-GPU, nvidia 1060 | expand

Commit Message

Alex Williamson Sept. 30, 2020, 3:12 p.m. UTC
There are definitely resource allocation issues on the host in the
crashing case.  The quirks currently enumerate the device BARs without
testing them, we identify a device and know what the resources should
be, which is why I think QEMU crashes.  Are you able to test if the
patch below is sufficient to resolve the crash?  I'd expect the GPU not
to work in the guest as it doesn't have enough resources, but the goal
would be to resolve the crash; QEMU cannot fix the device mappings on
the host.
diff mbox series


diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 0d83eb0e47bb..10477af9fc14 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2921,7 +2921,9 @@  static void vfio_realize(PCIDevice *pdev, Error **errp)
     for (i = 0; i < PCI_ROM_SLOT; i++) {
-        vfio_bar_quirk_setup(vdev, i);
+        if (vdev->bars[i].size) {
+            vfio_bar_quirk_setup(vdev, i);
+        }
     if (!vdev->igd_opregion &&