[PATCH 00/17] KVM: arm64: More user_mem_abort() rework
Fuad Tabba
tabba at google.com
Mon Mar 16 13:33:03 PDT 2026
On Mon, 16 Mar 2026 at 20:26, Fuad Tabba <tabba at google.com> wrote:
>
> Hi Marc,
>
> On Mon, 16 Mar 2026 at 17:55, Marc Zyngier <maz at kernel.org> wrote:
> >
> > Piqued by Fuad's initial set of patches[1] splitting user_mem_abort()
> > into more "edible" functions, I've added my on take on top of it with
> > a few goals in mind:
> >
> > - contextualise the state by splitting kvm_s2_fault into more granular
> > structures
> >
> > - reduce the amount of state that is visible and/or mutable by any
> > single function
> >
> > - reduce the number of variable that simply cache state that is
> > already implicitly available (and often only a helper away)
> >
> > I find the result reasonably attractive, and throwing it at a couple
> > of machines didn't result in anything out of the ordinary.
> >
> > For those interested, I have stashed a branch at [2], and I'd
> > appreciate some feedback on the outcome.
> >
> > [1] https://lore.kernel.org/all/20260306140232.2193802-1-tabba@google.com/
> > [2] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=hack/user_mem_abort-rework
>
> The series in hack/user_mem_abort-rework is different from this one.
> Here are the first few patches:
And I just realized it's because they're based on _my_ patches ... doh! :D
Sorry for the noise.
Cheers,
/fuad
> 7243471061be KVM: arm64: Extract VMA size resolution in user_mem_abort()
> 3a8557ce6025 KVM: arm64: Introduce struct kvm_s2_fault to user_mem_abort()
> 9f3c0a14bbcb KVM: arm64: Extract PFN resolution in user_mem_abort()
> 98740dc5cf2b KVM: arm64: Isolate mmap_read_lock inside new
> kvm_s2_fault_get_vma_info() helper
> ea364906b626 KVM: arm64: Extract stage-2 permission logic in user_mem_abort()
>
> The first patch here doesn't appear until quite later.
>
> Cheers,
> /fuad
>
> >
> > Marc Zyngier (17):
> > KVM: arm64: Kill fault->ipa
> > KVM: arm64: Make fault_ipa immutable
> > KVM: arm64: Move fault context to const structure
> > KVM: arm64: Replace fault_is_perm with a helper
> > KVM: arm64: Constrain fault_granule to kvm_s2_fault_map()
> > KVM: arm64: Kill write_fault from kvm_s2_fault
> > KVM: arm64: Kill exec_fault from kvm_s2_fault
> > KVM: arm64: Kill topup_memcache from kvm_s2_fault
> > KVM: arm64: Move VMA-related information to kvm_s2_fault_vma_info
> > KVM: arm64: Kill logging_active from kvm_s2_fault
> > KVM: arm64: Restrict the scope of the 'writable' attribute
> > KVM: arm64: Move kvm_s2_fault.{pfn,page} to kvm_s2_vma_info
> > KVM: arm64: Replace force_pte with a max_map_size attribute
> > KVM: arm64: Move device mapping management into kvm_s2_fault_pin_pfn()
> > KVM: arm64: Directly expose mapping prot and kill kvm_s2_fault
> > KVM: arm64: Simplify integration of adjust_nested_*_perms()
> > KVM: arm64: Convert gmem_abort() to struct kvm_s2_fault_desc
> >
> > arch/arm64/kvm/mmu.c | 428 ++++++++++++++++++++++---------------------
> > 1 file changed, 223 insertions(+), 205 deletions(-)
> >
> > --
> > 2.47.3
> >
More information about the linux-arm-kernel
mailing list