Re: [PATCH v5 05/27] iommu/arm-smmu-v3: Split code with hyp

From: Jason Gunthorpe

Date: Fri Nov 28 2025 - 11:46:57 EST


On Mon, Nov 17, 2025 at 06:47:52PM +0000, Mostafa Saleh wrote:
> The KVM SMMUv3 driver would re-use some of the cmdq code inside
> the hypervisor, move these functions to a new common c file that
> is shared between the host kernel and the hypervisor.
>
> Signed-off-by: Mostafa Saleh <smostafa@xxxxxxxxxx>
> ---
> drivers/iommu/arm/arm-smmu-v3/Makefile | 2 +-
> .../arm/arm-smmu-v3/arm-smmu-v3-common-lib.c | 114 +++++++++++++
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 161 ------------------
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 61 +++++++

I would think these inlines should go in some -common.h instead of
arm-smmu-v3.h for better clarity, and ideally pkvm stuff does not
include arm-smmu-v3.h at all?

Jason