AMD/IOMMU: re-work locking around sending of commands
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 10:35:12 +0000 (12:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 10:35:12 +0000 (12:35 +0200)
commitf95b7b37cfc6d4613721df9357090d14712013c0
tree562d18a4ac9cdf397cc2f5e5dfb6f9bad4b3c134
parentb175fc0c1274df34ff8bd89d603c88b014b22f10
AMD/IOMMU: re-work locking around sending of commands

It appears unhelpful to me for flush_command_buffer() to block all
progress elsewhere for the given IOMMU by holding its lock while waiting
for command completion. There's no real need for callers of that
function or of send_iommu_command() to hold the lock. Contain all
command sending related locking to the latter function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/drivers/passthrough/amd/iommu_cmd.c
xen/drivers/passthrough/amd/iommu_guest.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/amd/pci_amd_iommu.c