AMD/IOMMU: use bit field for IRTE
authorJan Beulich <jbeulich@suse.com>
Wed, 31 Jul 2019 11:15:39 +0000 (13:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 31 Jul 2019 11:15:39 +0000 (13:15 +0200)
commitb75623c5062b741248547862a3e1b7d4b129c128
treebf69e0592feee129058c1ee9cf49671d73933ea5
parent08344ec71cad07829855fb7927faaafd26189798
AMD/IOMMU: use bit field for IRTE

At the same time restrict its scope to just the single source file
actually using it, and abstract accesses by introducing a union of
pointers. (A union of the actual table entries is not used to make it
impossible to [wrongly, once the 128-bit form gets added] perform
pointer arithmetic / array accesses on derived types.)

Also move away from updating the entries piecemeal: Construct a full new
entry, and write it out.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Brian Woods <brian.woods@amd.com>
xen/drivers/passthrough/amd/iommu_intr.c
xen/include/asm-x86/hvm/svm/amd-iommu-defs.h