Re: [PATCH v5 05/27] iommu/arm-smmu-v3: Split code with hyp
From: Mostafa Saleh <smostafa@google.com>
Date: 2025-12-12 15:41:39
Also in:
kvmarm, linux-iommu, lkml
From: Mostafa Saleh <smostafa@google.com>
Date: 2025-12-12 15:41:39
Also in:
kvmarm, linux-iommu, lkml
On Fri, Nov 28, 2025 at 12:46:55PM -0400, Jason Gunthorpe wrote:
On Mon, Nov 17, 2025 at 06:47:52PM +0000, Mostafa Saleh wrote:quoted
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@google.com> --- 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?
My thought was that we use “arm-smmu-v3.h” to avoid moving a lot of code and messing up the git history, but I have no strong opinion, splitting is fine also. Thanks, Mostafa
Jason