From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze1dC-0001pM-0c for qemu-devel@nongnu.org; Mon, 21 Sep 2015 09:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ze1d7-0004Wy-VG for qemu-devel@nongnu.org; Mon, 21 Sep 2015 09:59:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze1d7-0004Wb-OI for qemu-devel@nongnu.org; Mon, 21 Sep 2015 09:59:41 -0400 References: <1442833057-8186-1-git-send-email-den@openvz.org> From: Paolo Bonzini Message-ID: <56000D4A.8080300@redhat.com> Date: Mon, 21 Sep 2015 15:59:38 +0200 MIME-Version: 1.0 In-Reply-To: <1442833057-8186-1-git-send-email-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 0/9] hmp command IO- and Local APIC dump state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Markus Armbruster , Luiz Capitulino , qemu-devel@nongnu.org, =?UTF-8?Q?Andreas_F=c3=a4rber?= , Pavel Butsykin On 21/09/2015 12:57, Denis V. Lunev wrote: > Added the hmp command to query IO- and Local APIC registers state, > it can be very useful to identify problems related to the emulation dev= ices. >=20 > (qemu) info lapic > dumping local APIC state for CPU 0 >=20 > LVT0 0x00010700 active-hi edge masked ExtINT = (vec 0) > LVT1 0x00000400 active-hi edge NMI > LVTPC 0x00010000 active-hi edge masked Fixed = (vec 0) > LVTERR 0x000000fe active-hi edge Fixed = (vec 254) > LVTTHMR 0x00010000 active-hi edge masked Fixed = (vec 0) > LVTT 0x000000ef active-hi edge one-shot Fixed = (vec 239) > Timer DCR=3D0x3 (divide by 16) initial_count =3D 62278 > SPIV 0x000001ff APIC enabled, focus=3Doff, spurious vec 255 > ICR 0x000000fd physical edge de-assert no s/no/no-shorthand/ or similar. > ICR2 0x00000001 cpu 1 (X2APIC ID) > ESR 0x00000000 > ISR Adding a "(none)" here would be nice. > IRR 239 >=20 > APR 0x00 TPR 0x00 DFR 0x0f LDR 0x00 PPR 0x00 >=20 > (qemu) info ioapic > ioapic id=3D0x00 sel=3D0x2e (redir[15]) > pin 0 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 1 0x0000000000000031 dest=3D0 vec=3D49 active-hi edge fix= ed physical > pin 2 0x0000000000000030 dest=3D0 vec=3D48 active-hi edge fix= ed physical > pin 3 0x0000000000000033 dest=3D0 vec=3D51 active-hi edge fix= ed physical > pin 4 0x0000000000010034 dest=3D0 vec=3D52 active-hi edge masked fix= ed physical > pin 5 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 6 0x0000000000000036 dest=3D0 vec=3D54 active-hi edge fix= ed physical > pin 7 0x0000000000000037 dest=3D0 vec=3D55 active-hi edge fix= ed physical > pin 8 0x0000000000000038 dest=3D0 vec=3D56 active-hi edge fix= ed physical > pin 9 0x0000000000018041 dest=3D0 vec=3D65 active-hi level masked fix= ed physical > pin 10 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 11 0x0300000000008081 dest=3D3 vec=3D129 active-hi level fix= ed physical > pin 12 0x000000000000003c dest=3D0 vec=3D60 active-hi edge fix= ed physical > pin 13 0x000000000000003d dest=3D0 vec=3D61 active-hi edge fix= ed physical > pin 14 0x000000000000003e dest=3D0 vec=3D62 active-hi edge fix= ed physical > pin 15 0x000000000000003f dest=3D0 vec=3D63 active-hi edge fix= ed physical > pin 16 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 17 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 18 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 19 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 20 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 21 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 22 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > pin 23 0x0000000000010000 dest=3D0 vec=3D0 active-hi edge masked fix= ed physical > IRR (none) I would print IRR as a bitmap here, like ISR/IRR in the local APIC dump. Similarly, it would be nice to print the "Remote IRR" bits of the redirection table (printing them as a bitmap with the same format). >=20 > Changes from v1: > - implementation of hmp commands moved to the target-i386 part > - the cpu_dump_apic_local_state interface moved to the target-i386 par= t >=20 > Changes from v2: > - lapic and ioapic format dump are fixed for more human readable view >=20 > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Paolo Bonzini > CC: Andreas F=C3=A4rber I would like a second look at the HMP code. Paolo > Pavel Butsykin (9): > apic_internal.h: make some apic_get_* functions externally visible > apic_internal.h: rename ESR_ILLEGAL_ADDRESS to > APIC_ESR_ILLEGAL_ADDRESS > apic_internal.h: added more constants > apic_internal.h: fix formatting and drop unused consts > monitor: make monitor_fprintf and mon_get_cpu externally visible > hmp: added local apic dump state > ioapic_internal.h: added more constants > hmp: added io apic dump state > hmp: implemented io apic dump state for TCG >=20 > disas.c | 10 -- > hmp-commands-info.hx | 32 +++++++ > hw/i386/kvm/ioapic.c | 10 ++ > hw/intc/apic.c | 22 +---- > hw/intc/ioapic.c | 12 +++ > hw/intc/ioapic_common.c | 37 ++++++++ > include/hw/i386/apic_internal.h | 96 ++++++++++++++++--- > include/hw/i386/ioapic_internal.h | 7 ++ > include/hw/i386/pc.h | 5 + > include/monitor/hmp-target.h | 3 + > include/monitor/monitor.h | 1 + > monitor.c | 5 +- > target-i386/cpu.h | 3 + > target-i386/helper.c | 190 ++++++++++++++++++++++++++++++= ++++++++ > target-i386/monitor.c | 17 ++++ > 15 files changed, 407 insertions(+), 43 deletions(-) >=20