KVM: arm/arm64: vgic: Add debugfs vgic-state file

Add a file to debugfs to read the in-kernel state of the vgic.  We don't
do any locking of the entire VGIC state while traversing all the IRQs,
so if the VM is running the user/developer may not see a quiesced state,
but should take care to pause the VM using facilities in user space for
that purpose.

We also don't support LPIs yet, but they can be added easily if needed.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
This commit is contained in:
Christoffer Dall
2017-01-17 23:09:13 +01:00
parent 8694e4da66
commit 10f92c4c53
6 changed files with 297 additions and 0 deletions

View File

@@ -166,6 +166,8 @@ struct vgic_its {
struct list_head collection_list;
};
struct vgic_state_iter;
struct vgic_dist {
bool in_kernel;
bool ready;
@@ -213,6 +215,9 @@ struct vgic_dist {
spinlock_t lpi_list_lock;
struct list_head lpi_list_head;
int lpi_list_count;
/* used by vgic-debug */
struct vgic_state_iter *iter;
};
struct vgic_v2_cpu_if {