VT-d: don't panic/warn on iommu=no-igfx
authorRusty Bird <rustybird@openmailbox.org>
Thu, 3 Aug 2017 10:40:25 +0000 (12:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 3 Aug 2017 10:40:25 +0000 (12:40 +0200)
commitdbf2a768565d8b79c65471a3d3b982b2874d6492
tree266fdb1a5381f0338ca434835dae803358c4fccc
parentb02bf38e094d4c18c6902db67821c4b2816fcc01
VT-d: don't panic/warn on iommu=no-igfx

When operating on an Intel graphics device, iommu_enable_translation()
panicked (force_iommu==1) or warned (force_iommu==0) about the BIOS if
is_igd_vt_enabled_quirk() returned 0. That's good if the actual BIOS
problem has been detected. But since commit 1463411, returning 0 could
also happen if the user simply passed "iommu=no-igfx", in which case
bailing out with an info message (instead of a panic/warning) would be
more appropriate.

The panic broke the combination "iommu=force,no-igfx", and also the case
where "iommu=no-igfx" is passed but force_iommu=1 is set automatically
by x2apic_bsp_setup().

Move the iommu_igfx check from is_igd_vt_enabled_quirk() into its only
caller iommu_enable_translation(), and tweak the logic.

Signed-off-by: Rusty Bird <rustybird@openmailbox.org>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/quirks.c