IOMMU/x86: switch to alternatives-call patching in further instances
authorJan Beulich <jbeulich@suse.com>
Mon, 31 Jan 2022 09:57:27 +0000 (10:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 31 Jan 2022 09:57:27 +0000 (10:57 +0100)
commitf66e3d6afcc1315a34475fbee5f46e7110397950
tree9029eaacde4c0370792f70b7ceb34d60f315023a
parentc5539e6e7b9e9f8e12d4e05b5f6db97ca94539e7
IOMMU/x86: switch to alternatives-call patching in further instances

This is, once again, to limit the number of indirect calls as much as
possible. The only hook invocation which isn't sensible to convert is
setup(). And of course Arm-only use sites are left alone as well.

Note regarding the introduction / use of local variables in pci.c:
struct pci_dev's involved fields are const. This const propagates, via
typeof(), to the local helper variables in the altcall macros. These
helper variables are, however, used as outputs (and hence can't be
const). In iommu_get_device_group() make use of the new local variables
to also simplify some adjacent code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/x86/iommu.c