]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Make active_vmids invalid on vCPU schedule out
authorShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Mon, 22 Nov 2021 12:18:44 +0000 (12:18 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 8 Feb 2022 14:57:04 +0000 (14:57 +0000)
commit0a051878f7d82867253dc32a5bd50f5564f5aee0
tree94812b659483a3d9daf59f9bc0d0e70d3784ccab
parent70254b9fe0dba09f0ab460d8b5b99667ffc1516e
KVM: arm64: Make active_vmids invalid on vCPU schedule out

Like ASID allocator, we copy the active_vmids into the
reserved_vmids on a rollover. But it's unlikely that
every CPU will have a vCPU as current task and we may
end up unnecessarily reserving the VMID space.

Hence, set active_vmids to an invalid one when scheduling
out a vCPU.

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-5-shameerali.kolothum.thodi@huawei.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/vmid.c