[PATCH v2 6/7] iommufd: Implement sw_msi support natively
Jason Gunthorpe
jgg at nvidia.com
Fri Feb 21 06:51:41 PST 2025
On Wed, Feb 19, 2025 at 05:31:41PM -0800, Nicolin Chen wrote:
> +/*
> + * Get a iommufd_sw_msi_map for the msi physical address requested by the irq
> + * layer. The mapping to IOVA is global to the iommufd file descriptor, every
> + * domain that is attached to a device using the same MSI parameters will use
> + * the same IOVA.
> + */
> +static struct iommufd_sw_msi_map *
> +iommufd_sw_msi_get_map(struct iommufd_ctx *ictx, phys_addr_t msi_addr,
> + phys_addr_t sw_msi_start)
> +{
This ends up being never called if !CONFIG_IRQ_MSI_IOMMU because the
sw_msi doesn't exist.
--- a/drivers/iommu/iommufd/device.c
+++ b/drivers/iommu/iommufd/device.c
@@ -300,7 +300,7 @@ EXPORT_SYMBOL_NS_GPL(iommufd_device_to_id, "IOMMUFD");
* domain that is attached to a device using the same MSI parameters will use
* the same IOVA.
*/
-static struct iommufd_sw_msi_map *
+static __maybe_unused struct iommufd_sw_msi_map *
iommufd_sw_msi_get_map(struct iommufd_ctx *ictx, phys_addr_t msi_addr,
phys_addr_t sw_msi_start)
{
Fixed it up
Jason
More information about the linux-arm-kernel
mailing list