From: Tomita Moeko <tomitamoeko@gmail.com>
To: "Corvin Köhne" <C.Koehne@beckhoff.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 1/9] vfio/igd: Restrict legacy mode to Gen6-9 devices
Date: Mon, 5 May 2025 23:13:19 +0800 [thread overview]
Message-ID: <0e254df5-25db-435a-839e-28ff2e34e261@gmail.com> (raw)
In-Reply-To: <4781421b63032965326824850f34b90ad4b313ea.camel@beckhoff.com>
On 5/5/25 16:42, Corvin Köhne wrote:
> On Tue, 2025-04-29 at 00:09 +0800, Tomita Moeko wrote:
>> CAUTION: External Email!!
>> Intel only provides legacy VBIOS for IGD up to Gen9, and there is no
>> CSM support on later devices. Additionally, Seabios can only handle
>> 32-bit BDSM register used until Gen9. Since legacy mode requires VGA
>> capability, restrict it to Gen6 through Gen9 devices.
>>
>> Link:
>> https://nospamproxywebp.beckhoff.com/enQsig/link?id=BAgAAADAsHNi0zEFiakAAACORk589NFmMEL0IRdt7DRVpnoi_6WKuXqQANgyXom23JAMNMr3UlEVSZvZdOtespZyqyGqsgLV2z0x8MkoDwNY9VFWuoC1hAOa_kpJihDYFTkqJw9sxp1uw6X9Oml3OGmOnrY8bVlHo2n7h5uiu73mh7RdgB0cFnBy59ExBLmCowsh6nXK5LA_Udnf-WbH0pzMWtCwjhPF453hx1Rm93_KYzUhuyswu_sg0
>>
>> Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
>> ---
>> docs/igd-assign.txt | 1 +
>> hw/vfio/igd.c | 6 +++++-
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt
>> index 3aed7956d5..95beb76812 100644
>> --- a/docs/igd-assign.txt
>> +++ b/docs/igd-assign.txt
>> @@ -47,6 +47,7 @@ Intel document [1] shows how to dump VBIOS to file. For UEFI
>> Option ROM, see
>>
>> QEMU also provides a "Legacy" mode that implicitly enables full functionality
>> on IGD, it is automatically enabled when
>> +* IGD generation is 6 to 9 (Sandy Bridge to Comet Lake)
>> * Machine type is i440fx
>> * IGD is assigned to guest BDF 00:02.0
>> * ROM BAR or romfile is present
>> diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
>> index 6678e0e5cd..cecc3245b7 100644
>> --- a/hw/vfio/igd.c
>> +++ b/hw/vfio/igd.c
>> @@ -516,11 +516,13 @@ static bool vfio_pci_igd_config_quirk(VFIOPCIDevice
>> *vdev, Error **errp)
>>
>> /*
>> * For backward compatibility, enable legacy mode when
>> + * - Device geneation is 6 to 9 (including both)
>> * - Machine type is i440fx (pc_piix)
>> * - IGD device is at guest BDF 00:02.0
>> * - Not manually disabled by x-igd-legacy-mode=off
>> */
>> if ((vdev->igd_legacy_mode != ON_OFF_AUTO_OFF) &&
>> + (gen >= 6 && gen <= 9) &&
>> !strcmp(MACHINE_GET_CLASS(qdev_get_machine())->family, "pc_piix") &&
>> (&vdev->pdev == pci_find_device(pci_device_root_bus(&vdev->pdev),
>> 0, PCI_DEVFN(0x2, 0)))) {
>> @@ -565,7 +567,9 @@ static bool vfio_pci_igd_config_quirk(VFIOPCIDevice *vdev,
>> Error **errp)
>> vdev->features |= VFIO_FEATURE_ENABLE_IGD_LPC;
>> } else if (vdev->igd_legacy_mode == ON_OFF_AUTO_ON) {
>> error_setg(&err,
>> - "Machine is not i440fx or assigned BDF is not 00:02.0");
>> + "Machine is not i440fx, assigned BDF is not 00:02.0, "
>> + "or device %04x (gen %d) doesn't support legacy mode",
>> + vdev->device_id, gen);
>> goto error;
>> }
>>
>
> Afaik, at least the LPC quirk is required for Gen 10 and above for the GOP to
> work properly. On the other hand, Intel hasn't published any GOP yet, so it
> might be unlikely that user use it. So, not sure if this is a breaking change or
> not.
>
> Besides that:
>
> Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
>
A previous change has added a new experimental option x-igd-lpc to allow
users manually enable the LPC bridge quirk, the documentation was also
updated with "GOP driver depends on LPC bridge present". In non-legacy
mode, user can manually enable lpc quirk with x-igd-lpc=on option.
Thanks,
Moeko
next prev parent reply other threads:[~2025-05-05 15:13 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 [this message]
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
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=0e254df5-25db-435a-839e-28ff2e34e261@gmail.com \
--to=tomitamoeko@gmail.com \
--cc=C.Koehne@beckhoff.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).