]> git.baikalelectronics.ru Git - kernel.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)
commitef7352ce7e4af6370a2cc8c2b8449e8a7191bdc0
treedefb52db0f4aa5110d26cb0d9c54972b1698e924
parent01f7c6ef7203e5ef0b8ea17dc65bb4ef72e2c005
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