VT-d: generalize and correct "iommu=no-igfx" handling
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Oct 2021 09:56:21 +0000 (11:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Oct 2021 09:56:21 +0000 (11:56 +0200)
commit2d7f191b392e3efaf4f6e18e14b0b3c43a9e268b
treee9778c27c706a150579c34b4f951d1aedf8b4ad1
parent834cb8761051f7d87816785c0d99fe9bd5f0ce30
VT-d: generalize and correct "iommu=no-igfx" handling

Linux'es supposedly equivalent "intel_iommu=igfx_off" deals with any
graphics devices (not just Intel ones) while at the same time limiting
the effect to IOMMUs covering only graphics devices. Keying the decision
to leave translation disabled for an IOMMU to merely a magic SBDF tuple
was wrong in the first place - systems may very well have non-graphics
devices at 0000:00:02.0 (ordinary root ports commonly live there, for
example). Any use of igd_drhd_address (and hence is_igd_drhd()) needs
further qualification.

Introduce a new "graphics only" field in struct acpi_drhd_unit and set
it according to device scope parsing outcome. Replace the bad use of
is_igd_drhd() in iommu_enable_translation() by use of this new field.

While adding the new field also convert the adjacent include_all one to
"bool".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
docs/misc/xen-command-line.pandoc
xen/drivers/passthrough/vtd/dmar.c
xen/drivers/passthrough/vtd/dmar.h
xen/drivers/passthrough/vtd/iommu.c