VT-d: fix (de)assign ordering when RMRRs are in use
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:44:14 +0000 (14:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:44:14 +0000 (14:44 +0200)
commit2c0e367013f7f17753b48f2bd5ed34d85dcb8881
treeb70c9e1ed0f3d7e4345f6aa8d0362774f7dd4bb3
parent0e754e07b00f3ad644a3c05f85702bce8b4c0d5c
VT-d: fix (de)assign 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 updated.

Also adjust a related log message.

This is CVE-2022-26358 / part of XSA-400.

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: Paul Durrant <paul@xen.org>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: 78a40f8b5dfa1a3aec43528663f39473d4429101
master date: 2022-04-05 14:15:33 +0200
xen/drivers/passthrough/vtd/iommu.c