[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state |
Date: |
Fri, 19 Jun 2015 17:08:14 +0100 |
On 19 June 2015 at 15:48, Denis V. Lunev <address@hidden> wrote:
> From: Pavel Butsykin <address@hidden>
>
> 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 apic-io
> ioapic ID=00 IRR=00000000 SEL=18
> ioapic 00 00000000000100ff: int=ff delmod=0:Fixed P.H.EM dest=0
> ioapic 01 0300000000000993: int=93 delmod=1:LowPri L.H.E. dest=3
> ...
> ioapic 23 00000000000100ff: int=ff delmod=0:Fixed P.H.EM dest=0
> --- a/monitor.c
> +++ b/monitor.c
> @@ -957,6 +957,19 @@ int monitor_get_cpu_index(void)
> return cpu->cpu_index;
> }
>
> +#if defined(TARGET_I386)
> +static void hmp_info_apic_io(Monitor *mon, const QDict *qdict)
> +{
> + if (kvm_irqchip_in_kernel()) {
> + kvm_ioapic_dump_state(mon, qdict);
> + }
> +}
> +#else
> +static void hmp_info_apic_io(Monitor *mon, const QDict *qdict)
> +{
> +}
> +#endif
> +
> static void hmp_info_apic_local(Monitor *mon, const QDict *qdict)
> {
> CPUState *cpu;
> @@ -2588,6 +2601,13 @@ static mon_cmd_t info_cmds[] = {
> .mhandler.cmd = hmp_info_apic_local,
> },
> {
> + .name = "apic-io",
> + .args_type = "",
> + .params = "",
> + .help = "show io apic state",
> + .mhandler.cmd = hmp_info_apic_io,
> + }
Can we please not add more target- and device-specific code
to monitor.c? We need a sensible abstraction layer that allows
devices and CPUs to register monitor commands without
filling monitor.c up with random ifdeffery.
thanks
-- PMM
- [Qemu-devel] [PATCH 3/8] apic_internal.h: added more constants, (continued)
- [Qemu-devel] [PATCH 3/8] apic_internal.h: added more constants, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 1/8] apic_internal.h: move apic_get_bit(), apic_set_bit() to apic_internal.h, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 6/8] ioapic_internal.h: added more constants, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 2/8] apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESS, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 5/8] hmp: added local apic dump state, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 8/8] hmp: implemented io apic dump state for emulator, Denis V. Lunev, 2015/06/19
- [Qemu-devel] [PATCH 4/8] apic_internal.h: Fix formatting and drop unused consts, Denis V. Lunev, 2015/06/19
- Re: [Qemu-devel] [PATCH 0/8] hmp command IO- and Local APIC dump state, Eric Blake, 2015/06/19