]> xenbits.xensource.com Git - xen.git/commit
VT-d: improve RMRR region handling
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Dec 2009 13:39:12 +0000 (13:39 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 22 Dec 2009 13:39:12 +0000 (13:39 +0000)
commit2201b67b91289718f4661f90dbbf0a897b640615
treed2a7bab54ad75a69cbf58d8d5335050a6fd7f104
parent6340819756c599e63366a3fa6ecd5ab1eec8b198
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>
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/include/xen/hvm/iommu.h