summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2017-08-30 03:25:09 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:46 (GMT)
commit662a8935a5dabafdb4f747ba17f5204f4c0e2337 (patch)
tree3f5359f1205ccd56ab03839fcc508185c8e5c986 /kernel
parent2d918c9fbb0c8eabc8efc63b3e98a0f8e403deb8 (diff)
downloadlinux-662a8935a5dabafdb4f747ba17f5204f4c0e2337.tar.xz
iommu: Disambiguate MSI region types
commit 81ea50c9fe8b478e611d44d64eb14c4b478ee0c3 [iommu part] The introduction of reserved regions has left a couple of rough edges which we could do with sorting out sooner rather than later. Since we are not yet addressing the potential dynamic aspect of software-managed reservations and presenting them at arbitrary fixed addresses, it is incongruous that we end up displaying hardware vs. software-managed MSI regions to userspace differently, especially since ARM-based systems may actually require one or the other, or even potentially both at once, (which iommu-dma currently has no hope of dealing with at all). Let's resolve the former user-visible inconsistency ASAP before the ABI has been baked into a kernel release, in a way that also lays the groundwork for the latter shortcoming to be addressed by follow-up patches. For clarity, rename the software-managed type to IOMMU_RESV_SW_MSI, use IOMMU_RESV_MSI to describe the hardware type, and document everything a little bit. Since the x86 MSI remapping hardware falls squarely under this meaning of IOMMU_RESV_MSI, apply that type to their regions as well, so that we tell the same story to userspace across all platforms. Secondly, as the various region types require quite different handling, and it really makes little sense to ever try combining them, convert the bitfield-esque #defines to a plain enum in the process before anyone gets the wrong impression. Fixes: d30ddcaa7b02 ("iommu: Add a new type field in iommu_resv_region") Reviewed-by: Eric Auger <eric.auger@redhat.com> CC: Alex Williamson <alex.williamson@redhat.com> CC: David Woodhouse <dwmw2@infradead.org> CC: kvm@vger.kernel.org Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> [Bharat: porting to 4.9] Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions