Stefano Stabellini
2013-Feb-15 18:49 UTC
[PATCH 3/4] xen/arm: dump gic debug info from arch_dump_domain_info
Print some useful GIC debug information when arch_dump_domain_info is called (''q'' debug key). Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- xen/arch/arm/domain.c | 6 ++++++ xen/arch/arm/gic.c | 27 +++++++++++++++++++++++++++ xen/include/asm-arm/gic.h | 3 +++ 3 files changed, 36 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index e37ec54..817e800 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -568,6 +568,12 @@ int domain_relinquish_resources(struct domain *d) void arch_dump_domain_info(struct domain *d) { + struct vcpu *v; + + for_each_vcpu ( d, v ) + { + gic_dump_info(v); + } } long arch_do_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 88f2d3a..9db1f57 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -677,6 +677,33 @@ static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *r } } +void gic_dump_info(struct vcpu *v) +{ + int i; + struct pending_irq *p; + + printk("GICH_LRs (vcpu %d) mask=%llx\n", v->vcpu_id, v->arch.lr_mask); + if ( v == gic_running ) + { + for ( i = 0; i < nr_lrs; i++ ) + printk(" HW_LR[%d]=%x\n", i, GICH[GICH_LR + i]); + } else { + for ( i = 0; i < nr_lrs; i++ ) + printk(" VCPU_LR[%d]=%x\n", i, v->arch.gic_lr[i]); + } + + list_for_each_entry ( p, &v->arch.vgic.inflight_irqs, inflight ) + { + printk("Inflight irq=%d\n", p->irq); + } + + list_for_each_entry( p, &v->arch.vgic.lr_pending, lr_queue ) + { + printk("Pending irq=%d\n", p->irq); + } + +} + void __cpuinit init_maintenance_interrupt(void) { request_irq(25, maintenance_interrupt, 0, "irq-maintenance", NULL); diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index f4b0324..7c9499e 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -162,6 +162,9 @@ void register_gic_callback(int irq, gic_callback_fn_t fn); extern void gic_save_state(struct vcpu *v); extern void gic_restore_state(struct vcpu *v); +/* print useful debug info */ +extern void gic_dump_info(struct vcpu *v); + #endif /* __ASSEMBLY__ */ #endif -- 1.7.2.5
Ian Campbell
2013-Apr-10 15:24 UTC
Re: [PATCH 3/4] xen/arm: dump gic debug info from arch_dump_domain_info
On Fri, 2013-02-15 at 18:49 +0000, Stefano Stabellini wrote:> Print some useful GIC debug information when arch_dump_domain_info is > called (''q'' debug key). > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked + applied, thanks.
Possibly Parallel Threads
- [PATCH v2 13/15] xen: arm: Add debug keyhandler to dump the physical GIC state.
- [PATCH v3] xen/gic: EOI irqs on the right pcpu
- [PATCH v2] xen/gic: EOI irqs on the right pcpu
- [PATCH v3] arm: support fewer LR registers than virtual irqs
- [PATCH] Make XEN_DOMCTL_destroydomain hypercall continuable.