]> xenbits.xensource.com Git - people/liuw/xen.git/commit
AMD/IOMMU: pre-fill all DTEs right after table allocation
authorJan Beulich <jbeulich@suse.com>
Thu, 10 Oct 2019 07:51:46 +0000 (09:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Oct 2019 07:51:46 +0000 (09:51 +0200)
commit1b00c16bdfbec98887731a40ea9f377f7dcac405
tree2d7f295e679f32f5589adb8154ae7a2670ed96f5
parent110d762e54b3efc9b26efc62fa35f306d1adeba9
AMD/IOMMU: pre-fill all DTEs right after table allocation

Make sure we don't leave any DTEs unexpected requests through which
would be passed through untranslated. Set V and IV right away (with
all other fields left as zero), relying on the V and/or IV bits
getting cleared only by amd_iommu_set_root_page_table() and
amd_iommu_set_intremap_table() under special pass-through circumstances.
Switch back to initial settings in amd_iommu_disable_domain_device().

Take the liberty and also make the latter function static, constifying
its first parameter at the same time, at this occasion.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/pci_amd_iommu.c