summaryrefslogtreecommitdiff
path: root/include/kvm
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2024-04-22 23:01:47 +0300
committerMarc Zyngier <maz@kernel.org>2024-04-25 15:19:55 +0300
commit8201d1028caa4fae88e222c4e8cf541fdf45b821 (patch)
treebc83f5c5159755629b10a908bf9b920201805ed5 /include/kvm
parentc09c8ab99a8afb24f6b4a6bc7c2767fec348ae81 (diff)
downloadlinux-8201d1028caa4fae88e222c4e8cf541fdf45b821.tar.xz
KVM: arm64: vgic-its: Maintain a translation cache per ITS
Within the context of a single ITS, it is possible to use an xarray to cache the device ID & event ID translation to a particular irq descriptor. Take advantage of this to build a translation cache capable of fitting all valid translations for a given ITS. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240422200158.2606761-9-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_vgic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index ac7f15ec1586..c15e7fcccb86 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -210,6 +210,12 @@ struct vgic_its {
struct mutex its_lock;
struct list_head device_list;
struct list_head collection_list;
+
+ /*
+ * Caches the (device_id, event_id) -> vgic_irq translation for
+ * LPIs that are mapped and enabled.
+ */
+ struct xarray translation_cache;
};
struct vgic_state_iter;