OSDN Git Service

iommu/vt-d: Allow RMRR on graphics devices too
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 Mar 2015 15:05:47 +0000 (15:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jun 2015 00:03:26 +0000 (17:03 -0700)
commita48b654c95292046937c35b4077e93e4cd77ee6f
tree2a66aed9d5d1570ecfcfa636e1b5e256184de719
parent20dfcc2878dabdd473df714c6a669ad38533c948
iommu/vt-d: Allow RMRR on graphics devices too

commit 18436afdc11a00ac881990b454cfb2eae81d6003 upstream.

Commit c875d2c1 ("iommu/vt-d: Exclude devices using RMRRs from IOMMU API
domains") prevents certain options for devices with RMRRs. This even
prevents those devices from getting a 1:1 mapping with 'iommu=pt',
because we don't have the code to handle *preserving* the RMRR regions
when moving the device between domains.

There's already an exclusion for USB devices, because we know the only
reason for RMRRs there is a misguided desire to keep legacy
keyboard/mouse emulation running in some theoretical OS which doesn't
have support for USB in its own right... but which *does* enable the
IOMMU.

Add an exclusion for graphics devices too, so that 'iommu=pt' works
there. We should be able to successfully assign graphics devices to
guests too, as long as the initial handling of stolen memory is
reconfigured appropriately. This has certainly worked in the past.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/intel-iommu.c