AMD/IOMMU: redo awaiting of command completion
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 10:34:37 +0000 (12:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Jun 2021 10:34:37 +0000 (12:34 +0200)
commitb175fc0c1274df34ff8bd89d603c88b014b22f10
tree76fdd1cf45b309b45386fe74c114acf8c3f6c9ab
parentf004fd7cbbba9f3d58b399d5becfe4e8c5230fb6
AMD/IOMMU: redo awaiting of command completion

The present abuse of the completion interrupt does not only stand in the
way of, down the road, using it for its actual purpose, but also
requires holding the IOMMU lock while waiting for command completion,
limiting parallelism and keeping interrupts off for non-negligible
periods of time. Have the IOMMU do an ordinary memory write instead of
signaling an otherwise disabled interrupt (by just updating a status
register bit).

Since IOMMU_COMP_WAIT_I_FLAG_SHIFT is now unused and
IOMMU_COMP_WAIT_[FS]_FLAG_SHIFT already were, drop all three of them
while at it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/drivers/passthrough/amd/iommu-defs.h
xen/drivers/passthrough/amd/iommu_cmd.c