diff options
author | Marc Zyngier <maz@kernel.org> | 2019-11-07 19:04:11 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2019-11-08 14:13:24 +0300 |
commit | 5bd90b0989731520f2cdcfbbe467f1271f3cc803 (patch) | |
tree | f54a4b2b5212fa7916d6ecdf90c8eabf9ae9bff8 /virt/kvm/arm/vgic/vgic-init.c | |
parent | 9090825fa99740f0c794f94b9cbd57ad79101228 (diff) | |
download | linux-5bd90b0989731520f2cdcfbbe467f1271f3cc803.tar.xz |
KVM: vgic-v4: Track the number of VLPIs per vcpu
In order to find out whether a vcpu is likely to be the target of
VLPIs (and to further optimize the way we deal with those), let's
track the number of VLPIs a vcpu can receive.
This gets implemented with an atomic variable that gets incremented
or decremented on map, unmap and move of a VLPI.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Link: https://lore.kernel.org/r/20191107160412.30301-2-maz@kernel.org
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-init.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c index 6f50c429196d..b3c5de48064c 100644 --- a/virt/kvm/arm/vgic/vgic-init.c +++ b/virt/kvm/arm/vgic/vgic-init.c @@ -203,6 +203,7 @@ int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu) INIT_LIST_HEAD(&vgic_cpu->ap_list_head); raw_spin_lock_init(&vgic_cpu->ap_list_lock); + atomic_set(&vgic_cpu->vgic_v3.its_vpe.vlpi_count, 0); /* * Enable and configure all SGIs to be edge-triggered and |