[PATCH v8 0/9] Make the SMMUv3 CD logic match the new STE design (part 2a/3)

Will Deacon will at kernel.org
Tue Apr 30 10:18:25 PDT 2024


Hi Jason,

On Tue, Apr 23, 2024 at 10:14:05AM -0300, Jason Gunthorpe wrote:
> This is split out from the larger part two which aimes to rework the PASID
> related code.
> 
> No new functionality is introduced in theses commits, it just reorganizes
> the CD logic to follow the same design of the new STE logic using make
> functions and a single programming flow without leaking details to
> callers.
> 
> CD does not have as strong a need for this as STE, but all the code exists
> and continuing with the same pattern makes for fewer things to understand
> inside the driver.
> 
> The following PASID code makes use of this to rethread how the CD
> programming works to take a caller created struct arm_smmu_cd and then
> stick whatever that is into the live CD entry. This allows the actual
> PASID and CD logic to be general and then the PAGING and SVA domain types
> can sit on top of it.
> 
> There are four kinds of CDs:
>  - Blocking (ie cleared)
>  - S1 PAGING
>  - SVA
>  - SVA with a released MM (all fault)
> 
> The last two have to transition hitlessly.
> 
> v8:
>  - Remove ops->v_bit and just use entry[0] = 0
>  - Revise commit messages
>  - Revise comment in arm_smmu_get_cd_used()
>  - Move hunks removing code from arm_smmu_write_ctx_desc() earlier for
>    clarity
>  - Consistently avoid CTXDESC_SPLIT and remove the macro
>  - Don't check master->stall_enabled for the STALL_FORCE mm release
>  - Fixup rand config failures on the kunit
>  - Use VISIBLE_IF_KUNIT
>  - Move more mock structs to .data to avoid stack frame size warnings

I think Mostafa left some comments on patch 2 of your v7 after you had
posted the v8. Please could you spin a v9 with that addressed so I start
picking things up?

Cheers,

Will



More information about the linux-arm-kernel mailing list