]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite12d710a4fda0973a981a29af2c9a648505e0ad4
tree81e2df787cb9057107ff48d79601199eccf73742
parentcdcfc33f146631371044f576fc7b64d7e71508a3
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]