]> xenbits.xensource.com Git - xen.git/commit
IOMMU: generalize VT-d's tracking of mapped RMRR regions
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 12:15:57 +0000 (14:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Aug 2021 12:15:57 +0000 (14:15 +0200)
commitc0e19d7c6c42f0bfccccd96b4f7b03b5515e10fc
tree2485565a8e2d1fca812c54bf0159985a64cfde7f
parentd1bb6c97c31ef754fb29b29eb307c090414e8022
IOMMU: generalize VT-d's tracking of mapped RMRR regions

In order to re-use it elsewhere, move the logic to vendor independent
code and strip it of RMRR specifics.

Note that the prior "map" parameter gets folded into the new "p2ma" one
(which AMD IOMMU code will want to make use of), assigning alternative
meaning ("unmap") to p2m_access_x. Prepare set_identity_p2m_entry() and
p2m_get_iommu_flags() for getting passed access types other than
p2m_access_rw (in the latter case just for p2m_mmio_direct requests).

Note also that, to be on the safe side, an overlap check gets added to
the main loop of iommu_identity_mapping().

This is part of XSA-378.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/arch/x86/mm/p2m.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/x86/iommu.c
xen/include/asm-x86/iommu.h
xen/include/asm-x86/p2m.h