]> 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)
commit7f00199c5f426b3ef5d23ffa5b257131ecbf355f
treedefb52db0f4aa5110d26cb0d9c54972b1698e924
parent9e72a2d098e145de9279e26317cf2df3a88078bc
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