From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z617b-00029A-Nd for qemu-devel@nongnu.org; Fri, 19 Jun 2015 14:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z617Z-0003Wf-GJ for qemu-devel@nongnu.org; Fri, 19 Jun 2015 14:34:35 -0400 Received: from mx2.parallels.com ([199.115.105.18]:46542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z617Z-0003Wb-An for qemu-devel@nongnu.org; Fri, 19 Jun 2015 14:34:33 -0400 Message-ID: <55845959.7030701@odin.com> Date: Fri, 19 Jun 2015 21:03:05 +0300 From: Pavel MIME-Version: 1.0 References: <1434725298-22666-1-git-send-email-den@openvz.org> <1434725298-22666-8-git-send-email-den@openvz.org> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/8] hmp: added io apic dump state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , "Denis V. Lunev" Cc: Paolo Bonzini , Pavel Butsykin , QEMU Developers , Luiz Capitulino On 19.06.2015 19:08, Peter Maydell wrote: > On 19 June 2015 at 15:48, Denis V. Lunev wrote: >> From: Pavel Butsykin >> >> 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 No problem. I think anything to do with it, thanks.