x86/vtd: Don't include control register state in the table pointers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 27 Nov 2018 17:21:17 +0000 (17:21 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 12 Mar 2019 13:57:13 +0000 (13:57 +0000)
commita9a05aeee10a5a3763a41305a9f38112dd1fcc82
tree64c774bff7b3b5cd27bc1f2cba497cc6de436912
parent65c165d6595f2762da577cb428e3bc61e32e0899
x86/vtd: Don't include control register state in the table pointers

iremap_maddr and qinval_maddr point to the base of a block of contiguous RAM,
allocated by the driver, holding the Interrupt Remapping table, and the Queued
Invalidation ring.

Despite their name, they are actually the values of the hardware register,
including control metadata in the lower 12 bits.  While uses of these fields
do appear to correctly shift out the metadata, this is very subtle behaviour
and confusing to follow.

Nothing uses the metadata, so make the fields actually point at the base of
the relevant tables.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/qinval.c
xen/drivers/passthrough/vtd/utils.c