]> xenbits.xensource.com Git - xen.git/commit
VT-d: correct dma_msi_set_affinity()
authorJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2016 13:33:43 +0000 (14:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2016 13:33:43 +0000 (14:33 +0100)
commit7f885a1f49a75c770360b030666a5c1545156e5c
tree449bc23be7f0614ebae9712ffe055fe178611277
parent2fdf5b25540f649ea8a41e4fdfb13cf399614af8
VT-d: correct dma_msi_set_affinity()

Commit 83cd2038fe ("VT-d: use msi_compose_msg()) together with
15aa6c6748 ("amd iommu: use base platform MSI implementation"),
introducing the use of a per-CPU scratch CPU mask, went too far:
dma_msi_set_affinity() may, at least in theory, be called in
interrupt context, and hence the use of that scratch variable is not
correct.

Since the function overwrites the destination information anyway,
allow msi_compose_msg() to be called with a NULL CPU mask, avoiding
the use of that scratch variable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/msi.c
xen/drivers/passthrough/vtd/iommu.c