KVM: arm64: vgic-its: Use the per-ITS translation cache for injection
authorOliver Upton <oliver.upton@linux.dev>
Mon, 22 Apr 2024 20:01:49 +0000 (20:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 25 Apr 2024 12:19:55 +0000 (13:19 +0100)
commite64f2918c6e7a2c2cbf310d1b571d1a886b91475
treeaab5f305e94149b72b369064857f50414dadb5b7
parentdedfcd17faf8718f4842e7fbfcd2e7026854d7f5
KVM: arm64: vgic-its: Use the per-ITS translation cache for injection

Everything is in place to switch to per-ITS translation caches. Start
using the per-ITS cache to avoid the lock serialization related to the
global translation cache. Explicitly check for out-of-range device and
event IDs as the cache index is packed based on the range the ITS
actually supports.

Take the RCU read lock to protect against the returned descriptor being
freed while trying to take a reference on it, as it is no longer
necessary to acquire the lpi_list_lock.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240422200158.2606761-11-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-its.c