VT-d: constrain IGD check

Marking a DRHD as controlling an IGD isn't very sensible without
checking that at the very least it's a graphics device that lives at
0000:00:02.0. Re-use the reading of the class-code to control both the
clearing of "gfx_only" and the setting of "igd_drhd_address".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: f8c4317295
master date: 2023-03-14 10:44:08 +0100
This commit is contained in:
Jan Beulich committed 2023-03-21 13:52:20 +01:00
1 parent cdde3171a2
commit 4d42cc4d25
1 file changed
+3 -6
+3 -6
View File
@@ -391,15 +391,12 @@ static int __init acpi_parse_dev_scope(
if ( drhd )
{
if ( (seg == 0) && (bus == 0) && (path->dev == 2) &&
(path->fn == 0) )
igd_drhd_address = drhd->address;
if ( gfx_only &&
pci_conf_read8(PCI_SBDF(seg, bus, path->dev, path->fn),
if ( pci_conf_read8(PCI_SBDF(seg, bus, path->dev, path->fn),
PCI_CLASS_DEVICE + 1) != 0x03
/* PCI_BASE_CLASS_DISPLAY */ )
gfx_only = false;
else if ( !seg && !bus && path->dev == 2 && !path->fn )
igd_drhd_address = drhd->address;
}
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.