mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
VT-d: fix iommu=no-igfx if the IOMMU scope contains fake device(s)
If the scope for IGD's IOMMU contains additional device that doesn't actually exist, iommu=no-igfx would not disable that IOMMU. In this particular case (Thinkpad x230) it included 00:02.1, but there is no such device on this platform. Consider only existing devices for the "gfx only" check as well as the establishing of IGD DRHD address (underlying is_igd_drhd(), which is used to determine applicability of two workarounds). Fixes:2d7f191b39("VT-d: generalize and correct "iommu=no-igfx" handling") Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> master commit:49de6749bamaster date: 2023-03-23 09:16:41 +0100
This commit is contained in:
1 parent
3c85fb7b65
commit
33b1c8cd86
1 file changed
+1
-1
@@ -389,7 +389,7 @@ static int __init acpi_parse_dev_scope(
|
||||
printk(VTDPREFIX " endpoint: %pp\n",
|
||||
&PCI_SBDF(seg, bus, path->dev, path->fn));
|
||||
|
||||
if ( drhd )
|
||||
if ( drhd && pci_device_detect(seg, bus, path->dev, path->fn) )
|
||||
{
|
||||
if ( pci_conf_read8(PCI_SBDF(seg, bus, path->dev, path->fn),
|
||||
PCI_CLASS_DEVICE + 1) != 0x03
|
||||
|
||||