vfio/igd: add x-igd-gms option back to set DSM region size for guest
authorTomita Moeko <tomitamoeko@gmail.com>
Fri, 6 Dec 2024 12:27:48 +0000 (20:27 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 26 Dec 2024 06:23:38 +0000 (07:23 +0100)
commit37f05a59e8695df3d1206e7100190e48ec0af847
treea2b9bba3cf44f3df31fad98cb138a49491850119
parentf926baa03b7babb8291ea4c1cbeadaf224977dae
vfio/igd: add x-igd-gms option back to set DSM region size for guest

DSM region is likely to store framebuffer in Windows, a small DSM
region may cause display issues (e.g. half of the screen is black).
Since 971ca22f041b ("vfio/igd: don't set stolen memory size to zero"),
the x-igd-gms option was functionally removed, QEMU uses host's
original value, which is determined by DVMT Pre-Allocated option in
Intel FSP of host bios.

However, some vendors do not expose this config item to users. In
such cases, x-igd-gms option can be used to manually set the data
stolen memory size for guest. So this commit brings this option back,
keeping its old behavior. When it is not specified, QEMU uses host's
value.

When DVMT Pre-Allocated option is available in host BIOS, user should
set DSM region size there instead of using x-igd-gms option.

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