]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: nv: Handle TLB invalidation targeting L2 stage-1
authorMarc Zyngier <maz@kernel.org>
Fri, 14 Jun 2024 14:45:43 +0000 (15:45 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 19 Jun 2024 08:14:37 +0000 (08:14 +0000)
commit8e236efa4cd2df8b270784a33d7e334933789f1a
tree2c90f19b82c0572125b11b23e6e177aa78358dab
parent67fda56e76da4c4be9a8502d7211dbba024576d2
KVM: arm64: nv: Handle TLB invalidation targeting L2 stage-1

While dealing with TLB invalidation targeting the guest hypervisor's
own stage-1 was easy, doing the same thing for its own guests is
a bit more involved.

Since such an invalidation is scoped by VMID, it needs to apply to
all s2_mmu contexts that have been tagged by that VMID, irrespective
of the value of VTTBR_EL2.BADDR.

So for each s2_mmu context matching that VMID, we invalidate the
corresponding TLBs, each context having its own "physical" VMID.

Co-developed-by: Jintack Lim <jintack.lim@linaro.org>
Co-developed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Jintack Lim <jintack.lim@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240614144552.2773592-8-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_nested.h
arch/arm64/kvm/nested.c
arch/arm64/kvm/sys_regs.c