From: "Corvin Köhne" <C.Koehne@beckhoff.com>
To: "tomitamoeko@gmail.com" <tomitamoeko@gmail.com>,
"clg@redhat.com" <clg@redhat.com>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 4/9] vfio/igd: Check vendor and device ID on GVT-g mdev
Date: Mon, 5 May 2025 08:50:47 +0000 [thread overview]
Message-ID: <808c3c34c617b6202b5b077f3b3e24b604e29a76.camel@beckhoff.com> (raw)
In-Reply-To: <20250428161004.35613-5-tomitamoeko@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
On Tue, 2025-04-29 at 00:09 +0800, Tomita Moeko wrote:
> CAUTION: External Email!!
> Check the vendor and device ID on GVT-g mdev to ensure it is a supported
> device [1]. This extra check is required for automatically enabling
> OpRegion access later.
>
> Note that Cherryview and Gemini Lake are marked as supported here since
> current code cannot distinguish them with other Gen8 and Gen9 devices.
> Since mdev cannot be created on these devices, this has no functional
> impact.
>
> [1]
> https://nospamproxywebp.beckhoff.com/enQsig/link?id=BAgAAAC7d6njJfw46ssAAADF-nyovaDPsQJyKOV5T7sLGnzTfabj4BLcrjbmZT8baVh1nRPWc5X1Mlcgmchoiq4Ame7F9pv8Dm3p32EVUqXHVZUZ4ydwKGK8058NOSzZdk88Xvq87l3akIni9zsivM8SufPB80Ps4QQhkcFR2xjFsyp1doPFX7-vdSDEuv_KSFgq4SZ6UXxq6JDwaLRbsVEkIog7tW-TROEpexsHJm7QzPVbqSCuoHky-Rb7fvkEimsF6AGSvCpAEejUDe78EDkE1k4RSw53IT6Ohg2
>
>
> Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
> ---
> hw/vfio/igd.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
> index d6880cbff7..c6ecbefb35 100644
> --- a/hw/vfio/igd.c
> +++ b/hw/vfio/igd.c
> @@ -671,6 +671,18 @@ error:
> static bool vfio_pci_kvmgt_config_quirk(VFIOPCIDevice *vdev, Error **errp)
> {
> g_autofree struct vfio_region_info *opregion = NULL;
> + int gen;
> +
> + if (!vfio_pci_is(vdev, PCI_VENDOR_ID_INTEL, PCI_ANY_ID) ||
> + !vfio_is_vga(vdev)) {
> + return true;
> + }
> +
> + /* FIXME: Cherryview is Gen8, but don't support GVT-g */
> + gen = igd_gen(vdev);
> + if (gen != 8 && gen != 9) {
> + return true;
> + }
>
> if ((vdev->features & VFIO_FEATURE_ENABLE_IGD_OPREGION) &&
> (!vfio_pci_igd_opregion_detect(vdev, &opregion, errp) ||
Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
--
Kind regards,
Corvin
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-05-05 8:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 16:09 [PATCH 0/9] vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically Tomita Moeko
2025-04-28 16:09 ` [PATCH 1/9] vfio/igd: Restrict legacy mode to Gen6-9 devices Tomita Moeko
2025-05-05 8:42 ` Corvin Köhne
2025-05-05 15:13 ` Tomita Moeko
2025-04-28 16:09 ` [PATCH 2/9] vfio/igd: Always emulate ASLS (OpRegion) register Tomita Moeko
2025-05-05 8:43 ` Corvin Köhne
2025-04-28 16:09 ` [PATCH 3/9] vfio/igd: Detect IGD device by OpRegion Tomita Moeko
2025-05-05 8:45 ` Corvin Köhne
2025-04-28 16:09 ` [PATCH 4/9] vfio/igd: Check vendor and device ID on GVT-g mdev Tomita Moeko
2025-05-05 8:50 ` Corvin Köhne [this message]
2025-04-28 16:10 ` [PATCH 5/9] vfio/igd: Check OpRegion support " Tomita Moeko
2025-05-05 8:51 ` Corvin Köhne
2025-04-28 16:10 ` [PATCH 6/9] vfio/igd: Enable OpRegion by default Tomita Moeko
2025-05-05 8:51 ` Corvin Köhne
2025-04-28 16:10 ` [PATCH 7/9] vfio/igd: Allow overriding GMS with 0xf0 to 0xfe on Gen9+ Tomita Moeko
2025-05-05 8:52 ` Corvin Köhne
2025-04-28 16:10 ` [PATCH 8/9] vfio/igd: Only emulate GGC register when x-igd-gms is set Tomita Moeko
2025-04-29 6:28 ` Corvin Köhne
2025-04-29 15:38 ` Tomita Moeko
2025-05-05 8:56 ` Corvin Köhne
2025-04-28 16:10 ` [PATCH 9/9] vfio/igd: Remove generation limitation for IGD passthrough Tomita Moeko
2025-05-05 14:09 ` Corvin Köhne
2025-05-05 7:33 ` [PATCH 0/9] vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically Tomita Moeko
2025-05-05 12:54 ` Cédric Le Goater
2025-05-05 14:10 ` Corvin Köhne
2025-05-05 16:14 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=808c3c34c617b6202b5b077f3b3e24b604e29a76.camel@beckhoff.com \
--to=c.koehne@beckhoff.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tomitamoeko@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).