x86/vtd: Drop struct iommu_flush
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 27 Nov 2018 15:06:15 +0000 (15:06 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Sep 2019 10:44:59 +0000 (11:44 +0100)
commit488eccdd568bb781b989d9c897045e3124339d6b
tree37943707ef3a982548b995387ddafb921f35e694
parent1cc8d6fbf48ac7226f34e16ca07d06e25acb222b
x86/vtd: Drop struct iommu_flush

It is unclear why this abstraction exists, but iommu_get_flush() returns
possibly NULL and every user unconditionally dereferences the result.  In
practice, I can't spot a path where iommu is NULL, so I think it is mostly
dead.

Move the two function pointers into struct vtd_iommu (using a flush prefix),
and delete iommu_get_flush().  Furthermore, there is no need to pass the IOMMU
pointer to the callbacks via a void pointer, so change the parameter to be
correctly typed as struct vtd_iommu.  Clean up bool_t to bool in surrounding
context.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/iommu.h
xen/drivers/passthrough/vtd/qinval.c