]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: arm64: vgic-its: Add infrastructure for table lookup
authorEric Auger <eric.auger@redhat.com>
Wed, 8 Feb 2017 04:20:04 +0000 (05:20 +0100)
committerChristoffer Dall <cdall@linaro.org>
Mon, 8 May 2017 12:38:10 +0000 (14:38 +0200)
commit920a7a8fa92ae0ec73c4f6d6f15c01f86017f20d
treedefb52db0f4aa5110d26cb0d9c54972b1698e924
parent528297f560add8b7cac2f401d6aeb5bb3d1ef345
KVM: arm64: vgic-its: Add infrastructure for table lookup

Add a generic scan_its_table() helper whose role consists in
scanning a contiguous table located in guest RAM and applying
a callback on each entry. Entries can be handled as linked lists
since the callback may return an id offset to the next entry and
also indicate whether the entry is the last one.

Helper functions also are added to compute the device/event ID
offset to the next DTE/ITE.

compute_next_devid_offset, compute_next_eventid_offset and
scan_table will become static in subsequent patches

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-its.c