This series replaces KVM's broadcast stage-2 TLB invalidation with a directed one: instead of a TLBI over the whole inner-shareable domain , KVM kicks only the vCPUs of the VM via KVM_REQ_DIRECT_TLBI and lets each of them locally invalidate its own stage-2 context before re-entering the guest. Changes since v1: - replace the generic KVM_REQ_TLB_FLUSH with a dedicated arm64 KVM_REQ_DIRECT_TLBI (WAIT|NO_WAKEUP): the arch hooks issue it themselves, and the routing decision is consolidated in kvm_tlbi_direct_enabled(), taken once at the call site; - keep every new line under CONFIG_KVM_ARM_DIRECT_TLBI (VHE-only, knob renamed to kvm_direct_tlbi), restore the TLBID/DVMBM paths to their baseline form, and publish page-table updates with a DSB ISHST on the request side; - exclude realm VMs and pinned VMIDs, and broadcast once on the first VFIO device assignment to close the routing-check race; - restructure the series: primitives, last-pCPU tracking (KABI_EXTEND), switch and predicate, pass-through exclusion, request machinery, migration gate, then the two enablement sites (the remote-flush hooks, kvm_tlb_flush_vmid_range()), so every commit builds on its own. Jinqian Yang (8): KVM: arm64: Add non-shareable VMID TLB invalidation primitive KVM: arm64: Track the last pCPU each vCPU ran on KVM: arm64: Add the direct-TLBI switch and routing predicate KVM: arm64: Exclude VMs with pass-through devices from directed flushes KVM: arm64: Add the directed request machinery KVM: arm64: Flush on migration behind the directed gate KVM: arm64: Route remote TLB flushes through the request machinery KVM: arm64: Route the shared range flush through the request machinery arch/arm64/include/asm/kvm_host.h | 37 +++++++ arch/arm64/include/asm/kvm_tlbi.h | 159 ++++++++++++++++++++++++++++++ arch/arm64/kvm/Kconfig | 23 +++++ arch/arm64/kvm/arm.c | 56 +++++++++++ arch/arm64/kvm/hyp/pgtable.c | 9 ++ arch/arm64/kvm/hyp/vhe/tlb.c | 52 ++++++++++ arch/arm64/kvm/mmu.c | 47 +++++++++ 7 files changed, 383 insertions(+) create mode 100644 arch/arm64/include/asm/kvm_tlbi.h -- 2.33.0