From d665d696c53f776ec2cb91505658969b9eb9906b Mon Sep 17 00:00:00 2001 From: Pavel Butsykin Date: Tue, 22 Sep 2015 16:18:20 +0300 Subject: hmp: added io apic dump state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the hmp command to query io apic state, may be usefull after guest crashes to understand IRQ routing in guest. Implementation is only for kvm here. The dump will look like (qemu) info ioapic ioapic id=0x00 sel=0x26 (redir[11]) pin 0 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical pin 1 0x0000000000000031 dest=0 vec=49 active-hi edge fixed physical ... pin 23 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical IRR (none) Remote IRR (none) Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber Message-Id: <1442927901-1084-9-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini --- include/hw/i386/ioapic_internal.h | 2 ++ include/hw/i386/pc.h | 4 ++++ include/monitor/hmp-target.h | 1 + 3 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h index 4f7764e183..797ed47305 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/include/hw/i386/ioapic_internal.h @@ -105,4 +105,6 @@ struct IOAPICCommonState { void ioapic_reset_common(DeviceState *dev); +void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s); + #endif /* !QEMU_IOAPIC_INTERNAL_H */ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 3e002c9da6..539cf64ed6 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -123,6 +123,10 @@ int pic_get_output(DeviceState *d); void hmp_info_pic(Monitor *mon, const QDict *qdict); void hmp_info_irq(Monitor *mon, const QDict *qdict); +/* ioapic.c */ + +void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict); + /* Global System Interrupts */ #define GSI_NUM_PINS IOAPIC_NUM_PINS diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index be50577b37..213566c612 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -43,5 +43,6 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict); void hmp_info_tlb(Monitor *mon, const QDict *qdict); void hmp_mce(Monitor *mon, const QDict *qdict); void hmp_info_local_apic(Monitor *mon, const QDict *qdict); +void hmp_info_io_apic(Monitor *mon, const QDict *qdict); #endif /* MONITOR_COMMON */ -- cgit v1.2.3