iommu/vt-d: Differentiate relaxable and non relaxable RMRRs
authorEric Auger <eric.auger@redhat.com>
Mon, 3 Jun 2019 06:53:36 +0000 (08:53 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 12 Jun 2019 08:32:59 +0000 (10:32 +0200)
commit1c5c59fbad20a63954de07687e4a29af18d1be12
tree679f960be04e177ca11c24917f3b3756a594e3fc
parentadfd373820906d376c8b643f1a279ac809605b6b
iommu/vt-d: Differentiate relaxable and non relaxable RMRRs

Now we have a new IOMMU_RESV_DIRECT_RELAXABLE reserved memory
region type, let's report USB and GFX RMRRs as relaxable ones.

We introduce a new device_rmrr_is_relaxable() helper to check
whether the rmrr belongs to the relaxable category.

This allows to have a finer reporting at IOMMU API level of
reserved memory regions. This will be exploitable by VFIO to
define the usable IOVA range and detect potential conflicts
between the guest physical address space and host reserved
regions.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c