iommu/vt-d: Make sure RMRRs are mapped before domain goes public
authorJoerg Roedel <jroedel@suse.de>
Thu, 25 Aug 2016 11:52:51 +0000 (13:52 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 5 Sep 2016 11:00:28 +0000 (13:00 +0200)
commit1c5ebba95b486f1ea0e17d76dd8f6d7f1a8d1e89
tree9514acd0448ff520f87ceaedf3eeff3e183aea50
parent76208356a0ab357a1fb9f43bedb7fd1046ad8ece
iommu/vt-d: Make sure RMRRs are mapped before domain goes public

When a domain is allocated through the get_valid_domain_for_dev
path, it will be context-mapped before the RMRR regions are
mapped in the page-table. This opens a short time window
where device-accesses to these regions fail and causing DMAR
faults.

Fix this by mapping the RMRR regions before the domain is
context-mapped.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c