diff options
author | Marc Zyngier <maz@kernel.org> | 2023-09-27 12:09:10 +0300 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-09-30 21:15:44 +0300 |
commit | b5daffb120bb60f974ae1a5589160b05c98e00e5 (patch) | |
tree | a02c55e80db41cfbf3a042730b3ec107827b8f58 /Documentation/virt/kvm/devices | |
parent | 54a8006d0b49044d0cb682119686a45de906fe3c (diff) | |
download | linux-b5daffb120bb60f974ae1a5589160b05c98e00e5.tar.xz |
KVM: arm64: vgic-v3: Optimize affinity-based SGI injection
Our affinity-based SGI injection code is a bit daft. We iterate
over all the CPUs trying to match the set of affinities that the
guest is trying to reach, leading to some very bad behaviours
if the selected targets are at a high vcpu index.
Instead, we can now use the fact that we have an optimised
MPIDR to vcpu mapping, and only look at the relevant values.
This results in a much faster injection for large VMs, and
in a near constant time, irrespective of the position in the
vcpu index space.
As a bonus, this is mostly deleting a lot of hard-to-read
code. Nobody will complain about that.
Suggested-by: Xu Zhao <zhaoxu.35@bytedance.com>
Tested-by: Joey Gouly <joey.gouly@arm.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230927090911.3355209-11-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'Documentation/virt/kvm/devices')
0 files changed, 0 insertions, 0 deletions