qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Pavel Butsykin <pbutsykin@virtuozzo.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state
Date: Fri, 19 Jun 2015 17:08:14 +0100	[thread overview]
Message-ID: <CAFEAcA8t2NEOKPcQjAxFWzemP=Rp-O_sC-qof0cFjsOR9q7ZtA@mail.gmail.com> (raw)
In-Reply-To: <1434725298-22666-8-git-send-email-den@openvz.org>

On 19 June 2015 at 15:48, Denis V. Lunev <den@openvz.org> wrote:
> From: Pavel Butsykin <pbutsykin@virtuozzo.com>
>
> 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

  parent reply	other threads:[~2015-06-19 16:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 14:48 [Qemu-devel] [PATCH 0/8] hmp command IO- and Local APIC dump state Denis V. Lunev
2015-06-19 14:48 ` [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 14:48 ` [Qemu-devel] [PATCH 2/8] apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESS Denis V. Lunev
2015-06-19 14:48 ` [Qemu-devel] [PATCH 3/8] apic_internal.h: added more constants Denis V. Lunev
2015-06-19 14:48 ` [Qemu-devel] [PATCH 4/8] apic_internal.h: Fix formatting and drop unused consts Denis V. Lunev
2015-06-19 14:48 ` [Qemu-devel] [PATCH 5/8] hmp: added local apic dump state Denis V. Lunev
2015-06-19 15:45   ` Andreas Färber
2015-06-19 18:02     ` Pavel
2015-06-19 14:48 ` [Qemu-devel] [PATCH 6/8] ioapic_internal.h: added more constants Denis V. Lunev
2015-06-19 14:48 ` [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state Denis V. Lunev
2015-06-19 15:53   ` Andreas Färber
2015-06-19 18:02     ` Pavel
2015-06-19 16:08   ` Peter Maydell [this message]
2015-06-19 18:03     ` Pavel
2015-06-19 14:48 ` [Qemu-devel] [PATCH 8/8] hmp: implemented io apic dump state for emulator Denis V. Lunev
2015-06-19 14:56 ` [Qemu-devel] [PATCH 0/8] hmp command IO- and Local APIC dump state Eric Blake
2015-06-19 15:01   ` Denis V. Lunev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA8t2NEOKPcQjAxFWzemP=Rp-O_sC-qof0cFjsOR9q7ZtA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=den@openvz.org \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pbutsykin@virtuozzo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).