Re: [PATCH v21 10/23] KVM: arm64: Add VM specific callback for S2 MMU operations

From: Suzuki K Poulose

Date: Sat Oct 03 2026 - 12:12:56 EST


On 03/10/2026 16:30, Suzuki K Poulose wrote:
On 03/10/2026 10:01, Marc Zyngier wrote:
On Thu, 01 Oct 2026 22:06:50 +0100,
Suzuki K Poulose <suzuki.poulose@xxxxxxx> wrote:

Add VM type specific S2 MMU operation backends which can be initialized per
VM flavor, to keep the handling cleaner.

Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
---
Changes since v19:
  - Add a blank line in kvm_arch_flush_remote_tlbs()


  struct kvm_s2_mmu {
      struct kvm_vmid vmid;
@@ -332,6 +345,8 @@ struct kvm_arch {
       */
      u64 fgu[__NR_FGT_GROUP_IDS__];
+    const struct kvm_vm_s2_ops *vm_s2_ops;
+

If you're touching this patch, can you please move this pointer next
to the vcpu_ops pointer?

Sure, I will do that.

Sorry, this is only stored in kvm_arch, while the vcpu_ops are stored
in the vcpu_arch, to avoid pointer chasing vcpu->kvm->arch->.

I could move it closer to the vm_flavor ?

Cheers
Suzuki