AMD/IOMMU: restore DTE fields in amd_iommu_setup_domain_device()
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Nov 2019 13:17:26 +0000 (14:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Nov 2019 13:17:26 +0000 (14:17 +0100)
commitf06d11d5a8339bb5a525069fdffdb45ca811d6f8
treed58776259bf3492517a3c8f360bd247d55e00121
parenta72c508656c0a0fa573890b290064e6035971f86
AMD/IOMMU: restore DTE fields in amd_iommu_setup_domain_device()

Commit 1b00c16bdf ("AMD/IOMMU: pre-fill all DTEs right after table
allocation") moved ourselves into a more secure default state, but
didn't take sufficient care to also undo the effects when handing a
previously disabled device back to a(nother) domain. Put the fields
that may have been changed elsewhere back to their intended values
(some fields amd_iommu_disable_domain_device() touches don't
currently get written anywhere else, and hence don't need modifying
here).

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/amd/pci_amd_iommu.c