VT-d: fix add/remove ordering when RMRRs are in use
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:44:53 +0000 (14:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:44:53 +0000 (14:44 +0200)
commitcf0dc7379b9e2aa5f4b3983d81c6e2ed9811c34f
tree1376d3aee1d855932d769246eaa25d9026e6bf1c
parent2c0e367013f7f17753b48f2bd5ed34d85dcb8881
VT-d: fix add/remove ordering when RMRRs are in use

In the event that the RMRR mappings are essential for device operation,
they should be established before updating the device's context entry,
while they should be torn down only after the device's context entry was
successfully cleared.

Also switch to %pd in related log messages.

Fixes: fa88cfadf918 ("vt-d: Map RMRR in intel_iommu_add_device() if the device has RMRR")
Fixes: 8b99f4400b69 ("VT-d: fix RMRR related error handling")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: 3221f270cf2eba0a22fd4f92319d664eacb92889
master date: 2022-04-05 14:16:10 +0200
xen/drivers/passthrough/vtd/iommu.c