]> xenbits.xensource.com Git - xen.git/commit
AMD/IOMMU: replace INTREMAP_ENTRIES
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2019 14:02:21 +0000 (16:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2019 14:02:21 +0000 (16:02 +0200)
commitbb038f311687554483fb997cfee213760029aeaf
tree15024a8caad6a04bd1c978694572d3215b125b9e
parent93a78101260b22510c5f823577ff826fbfc46136
AMD/IOMMU: replace INTREMAP_ENTRIES

Prepare for the number of entries to not be the maximum possible, by
separating checks against maximum size from ones against actual size.
For caller side simplicity have alloc_intremap_entry() return the
maximum possible value upon allocation failure, rather than the first
just out-of-bounds one.

Have the involved functions already take all the subsequently needed
arguments here already, to reduce code churn in the patch actually
making the allocation size dynamic.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
xen/drivers/passthrough/amd/iommu_intr.c
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h