[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/7] vfio/igd: return an invalid generation for unknown device
From: |
Corvin Köhne |
Subject: |
[PATCH v3 1/7] vfio/igd: return an invalid generation for unknown devices |
Date: |
Wed, 28 Aug 2024 15:43:22 +0200 |
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>
---
hw/vfio/igd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index d320d032a7..650a323dda 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 {
--
2.46.0
- [PATCH v3 0/7] vfio/igd: add passthrough support for IGDs of gen 11 and later, Corvin Köhne, 2024/08/28
- [PATCH v3 1/7] vfio/igd: return an invalid generation for unknown devices,
Corvin Köhne <=
- [PATCH v3 3/7] vfio/igd: use new BDSM register location and size for gen 11 and later, Corvin Köhne, 2024/08/28
- [PATCH v3 5/7] vfio/igd: add ID's for ElkhartLake and TigerLake, Corvin Köhne, 2024/08/28
- [PATCH v3 4/7] vfio/igd: add new bar0 quirk to emulate BDSM mirror, Corvin Köhne, 2024/08/28
- [PATCH v3 6/7] vfio/igd: don't set stolen memory size to zero, Corvin Köhne, 2024/08/28
- [PATCH v3 7/7] vfio/igd: correctly calculate stolen memory size for gen 9 and later, Corvin Köhne, 2024/08/28
- [PATCH v3 2/7] vfio/igd: support legacy mode for all known generations, Corvin Köhne, 2024/08/28
- Re: [PATCH v3 0/7] vfio/igd: add passthrough support for IGDs of gen 11 and later, Alex Williamson, 2024/08/29