KVM: arm64: vgic-v3: Limit IPI-ing when accessing GICR_{C,S}ACTIVER0
authorMarc Zyngier <maz@kernel.org>
Thu, 12 Jan 2023 15:48:40 +0000 (15:48 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 12 Jan 2023 21:18:08 +0000 (21:18 +0000)
commitfd2b165ce2ccdaad7d5972987acac259cff66ccb
tree648093d96ab32be7382e719cef6c0755243d4ace
parent59d78a2ec0e9cfba5935f3a0d3f14a771461cded
KVM: arm64: vgic-v3: Limit IPI-ing when accessing GICR_{C,S}ACTIVER0

When a vcpu is accessing *its own* redistributor's SGIs/PPIs, there
is no point in doing a stop-the-world operation. Instead, we can
just let the access occur as we do with GICv2.

This is a very minor optimisation for a non-nesting guest, but
a potentially major one for a nesting L1 hypervisor which is
likely to access the emulated registers pretty often (on each
vcpu switch, at the very least).

Reported-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230112154840.1808595-1-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-mmio.c