On 5/22/25 17:16, Tomita Moeko wrote:
In vfio_pci_igd_opregion_detect(), errp will be set when the device does not have OpRegion or is hotplugged. This errp will be propagated to pci_qdev_realize(), which interprets it as failure, causing unexpected termination on devices without OpRegion like SR-IOV VFs or discrete GPUs. Fix it by not setting errp in vfio_pci_igd_opregion_detect().This patch also checks if the device has OpRegion before hotplug status to prevent unwanted warning messages on non-IGD devices. Fixes: c0273e77f2d7 ("vfio/igd: Detect IGD device by OpRegion") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2968 Reported-by: Edmund Raile <[email protected]> Link: https://lore.kernel.org/qemu-devel/[email protected] Tested-by: Edmund Raile <[email protected]> Signed-off-by: Tomita Moeko <[email protected]> --- v2: * Add Tested-by from Edmund Raile. Thanks for the contribution. * Rebased on vfio-next * Fix typos. hw/vfio/igd.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
Applied to vfio-next. Thanks, C.
