aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/hvm
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-12-22 13:39:12 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-12-22 13:39:12 +0000
commit2201b67b91289718f4661f90dbbf0a897b640615 (patch)
treed2a7bab54ad75a69cbf58d8d5335050a6fd7f104 /xen/include/xen/hvm
parent6340819756c599e63366a3fa6ecd5ab1eec8b198 (diff)
downloadxen-2201b67b91289718f4661f90dbbf0a897b640615.tar.gz
xen-2201b67b91289718f4661f90dbbf0a897b640615.tar.bz2
xen-2201b67b91289718f4661f90dbbf0a897b640615.zip
VT-d: improve RMRR region handling
This patch improves RMRR regions handling as follows: 1) Get rid of duplicated RMRR mapping: different devices may share the same RMRR regions, when they are assigned to the same guest, it only need to map the same RMRR region once because RMRR region must be identity mapped. Add an array of mapped RMRRs to achieve this. 2) Needn't call domain_context_mapping to map the device again in iommu_prepare_rmrr_dev, and change iommu_prepare_rmrr_dev to rmrr_identity_mapping which is more suitable. 3) A device may have more than one RMRR regions, remove "break" in intel_iommu_add_device to let it map all RMRR regions of the device. Signed-off-by: Weidong Han <Weidong.han@intel.com>
Diffstat (limited to 'xen/include/xen/hvm')
-rw-r--r--xen/include/xen/hvm/iommu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 38c52b1e39..cc51ca3ea2 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,19 @@ struct g2m_ioport {
unsigned int np;
};
+struct mapped_rmrr {
+ struct list_head list;
+ u64 base;
+ u64 end;
+};
+
struct hvm_iommu {
u64 pgd_maddr; /* io page directory machine address */
spinlock_t mapping_lock; /* io page table lock */
int agaw; /* adjusted guest address width, 0 is level 2 30-bit */
struct list_head g2m_ioport_list; /* guest to machine ioport mapping */
u64 iommu_bitmap; /* bitmap of iommu(s) that the domain uses */
+ struct list_head mapped_rmrrs;
/* amd iommu support */
int domain_id;