OSDN Git Service

KVM: arm64: Introduce a new VMID allocator for KVM
authorShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Mon, 22 Nov 2021 12:18:41 +0000 (12:18 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 8 Feb 2022 14:46:28 +0000 (14:46 +0000)
commit417838392f2e657ee25cc30e373ff4c35a0faa90
tree81e2df787cb9057107ff48d79601199eccf73742
parentdfd42facf1e4ada021b939b4e19c935dcdd55566
KVM: arm64: Introduce a new VMID allocator for KVM

A new VMID allocator for arm64 KVM use. This is based on
arm64 ASID allocator algorithm.

One major deviation from the ASID allocator is the way we
flush the context. Unlike ASID allocator, we expect less
frequent rollover in the case of VMIDs. Hence, instead of
marking the CPU as flush_pending and issuing a local context
invalidation on the next context switch, we  broadcast TLB
flush + I-cache invalidation over the inner shareable domain
on rollover.

Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211122121844.867-2-shameerali.kolothum.thodi@huawei.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/vmid.c [new file with mode: 0644]