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 <tomitamo...@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.koe...@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