[PATCH v21 10/23] KVM: arm64: Add VM specific callback for S2 MMU operations
Suzuki K Poulose
suzuki.poulose at arm.com
Fri Oct 2 03:29:07 PDT 2026
Hi Fuad
On 02/10/2026 11:19, Fuad Tabba wrote:
> Hi Suzuki,
>
> On Thu, 01 Oct 2026 22:06:50 +0100, Suzuki K Poulose
> <suzuki.poulose at arm.com> wrote:
>> Add VM type specific S2 MMU operation backends which can be initialized per
>> VM flavor, to keep the handling cleaner.
>
> The rows only differ where the base already branches (the pKVM TLB
> flushes, the protected VM age and unmap, and from patch 12 its abort),
> so the case for the table rests on the Realm row, which isn't
> functional until the RMI backend lands. Beyond the flushes in patch
> 16, which operations do you expect it to override?
Thats it for now. But I also want to explore the flush_memslots() case,
where Realm doesn't need to do anything. May be it is easier to stub
that case out early.
>
> [...]
>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> [...]
>> int kvm_arch_flush_remote_tlbs(struct kvm *kvm)
> [...]
>> + if (!kvm->arch.vm_s2_ops->vm_flush_remote_tlbs)
>> + return 1;
>
> Every row sets it today, but returning 1 falls back to
> KVM_REQ_TLB_FLUSH, which arm64 doesn't handle, so nothing would be
> flushed. Could vm_flush_remote_tlbs be mandatory, checked in
> kvm_vm_init_vm_s2_ops()?
Agree, we could make that mandatory.
Suzuki
More information about the linux-arm-kernel
mailing list