> > Restore SR-IOV Intel iGPU VF passthrough capability:
> > Check x-igd-opregion=off parameter in vfio_pci_igd_config_quirk and
> > vfio_pci_kvmgt_config_quirk to ensure x-igd-opregion=off is
> > respected despite subsequent attempt of automatic
> > IGD opregion detection.
> >
> > Fixes: 7be29f2f1a3f ("Merge tag 'pull-vfio-20250509' of 
> > https://github.com/legoater/qemu into staging")
> 
> Can you bisect to a specific commit from the merge?  The merge may be
> where the issue was introduced to mainline, but the merge commit itself
> is more than likely not the source of the issue.  Thanks,
> 
> Alex

I have to admit, I have no idea how to pluck apart
that merge pull using git.

But from browsing the repo:
https://github.com/qemu/qemu/compare/master...legoater:qemu:vfio-10.1

If I'd have to guess it would be
b16785f1185d ("vfio/igd: Detect IGD device by OpRegion")
https://github.com/qemu/qemu/commit/b16785f1185d4f35a0313d9a472d75bdbafce221
where it is assumed that "IGD device always comes with OpRegion"
which is not true in the case of SR-IOV virtual function devices,
and the user's choice of `x-igd-opregion=off` should still be
respected, for the parameter to not be redundant.
The default was already changed to x-igd-opregion=on in
4574a4490a86 ("vfio/igd: Enable OpRegion by default").
https://github.com/qemu/qemu/commit/4574a4490a865587fd24587bd99067615ea1e9bd

> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2968
> > Signed-off-by: Edmund Raile <edmund.ra...@protonmail.com>
> > ---
> > This patch fixes a regression in QEMU’s VFIO IGD quirk handling that
> > established automatic IGD opregion detection which ignores
> > x-igd-opregion=off necessary for SR-IOV VF passthrough of
> > Intel iGPUs using i915-sriov-dkms.
> >
> > Please review and provide feedback.
> > Let me know if additional testing or changes are needed.
> >
> > Kind regards,
> > Edmund Raile.
> >
> >  hw/vfio/igd.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
> > index e7952d15a0..e54a2a2f00 100644
> > --- a/hw/vfio/igd.c
> > +++ b/hw/vfio/igd.c
> > @@ -523,6 +523,11 @@ static bool vfio_pci_igd_config_quirk(VFIOPCIDevice 
> > *vdev, Error **errp)
> >          return true;
> >      }
> >
> > +    /* Respect x-igd-opregion=off by skipping OpRegion handling */
> > +    if (!vdev->igd_opregion) {
> > +        return true;
> > +    }
> > +
> >      /* IGD device always comes with OpRegion */
> >      if (!vfio_pci_igd_opregion_detect(vdev, &opregion, errp)) {
> >          return true;
> > @@ -689,6 +694,11 @@ static bool vfio_pci_kvmgt_config_quirk(VFIOPCIDevice 
> > *vdev, Error **errp)
> >          return true;
> >      }
> >
> > +    /* Respect x-igd-opregion=off by skipping OpRegion handling */
> > +    if (!vdev->igd_opregion) {
> > +        return true;
> > +    }
> > +
> >      /* FIXME: Cherryview is Gen8, but don't support GVT-g */
> >      gen = igd_gen(vdev);
> >      if (gen != 8 && gen != 9) {

Reply via email to