vfio/igd: align generation with i915 kernel driver
authorTomita Moeko <tomitamoeko@gmail.com>
Fri, 6 Dec 2024 12:27:41 +0000 (20:27 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 26 Dec 2024 06:23:37 +0000 (07:23 +0100)
commit0bb758e97acec8c7bbd1c3d4d61ca20a050ae9b0
treeb06bd254be71c2537079276099a5133bf6df80bd
parent8492a6129c3c581cd6f94a0c11e9c4c5ebbac9dc
vfio/igd: align generation with i915 kernel driver

Define the igd device generations according to i915 kernel driver to
avoid confusion, and adjust comment placement to clearly reflect the
relationship between ids and devices.

The condition of how GTT stolen memory size is calculated is changed
accordingly as GGMS is in multiple of 2 starting from gen 8.

Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/r/20241206122749.9893-4-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/igd.c