diff mbox series

[PULL,2/8] vfio/igd: return an invalid generation for unknown devices

Message ID 20240917103229.876515-3-clg@redhat.com (mailing list archive)
State New
Headers show
Series [PULL,1/8] hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup() | expand

Commit Message

Cédric Le Goater Sept. 17, 2024, 10:32 a.m. UTC
From: Corvin Köhne <corvin.koehne@gmail.com>

Intel changes it's specification quite often e.g. the location and size
of the BDSM register has change for gen 11 devices and later. This
causes our emulation to fail on those devices. So, it's impossible for
us to use a suitable default value for unknown devices. Instead of
returning a random generation value and hoping that everthing works
fine, we should verify that different devices are working and add them
to our list of known devices.

Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
---
 hw/vfio/igd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index d320d032a7f3b19df0d055178f6fefe4bdfd8668..650a323ddaac746de780103ca857256709c0e0aa 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -90,7 +90,11 @@  static int igd_gen(VFIOPCIDevice *vdev)
         return 8;
     }
 
-    return 8; /* Assume newer is compatible */
+    /*
+     * Unfortunately, Intel changes it's specification quite often. This makes
+     * it impossible to use a suitable default value for unknown devices.
+     */
+    return -1;
 }
 
 typedef struct VFIOIGDQuirk {