From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbmST-0000h6-N6 for qemu-devel@nongnu.org; Tue, 15 Sep 2015 05:23:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbmSR-0006D6-NE for qemu-devel@nongnu.org; Tue, 15 Sep 2015 05:23:25 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:20581 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbmSR-000692-8t for qemu-devel@nongnu.org; Tue, 15 Sep 2015 05:23:23 -0400 From: "Denis V. Lunev" Date: Tue, 15 Sep 2015 12:22:59 +0300 Message-Id: <1442308988-653-1-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 0/9] hmp command IO- and Local APIC dump state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Denis V. Lunev" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini , qemu-devel@nongnu.org, Pavel Butsykin Added the hmp command to query IO- and Local APIC registers state, it can be very useful to identify problems related to the emulation devic= es. (qemu) info apic-local apic.lvt 00-timer 000300fd int=3Dfd .H.EMP delmod=3D0:Fixed apic.lvt 00-thermal 00010000 int=3D00 .H.EM. delmod=3D0:Fixed apic.lvt 00-perfmon 000000fe int=3Dfe .H.E.. delmod=3D0:Fixed apic.lvt 00-LINT0 0001001f int=3D1f .H.EM. delmod=3D0:Fixed apic.lvt 00-LINT1 000004ff int=3Dff .H.E.. delmod=3D4:NMI apic.lvt 00-Error 000000e3 int=3De3 .H.E.. delmod=3D0:Fixed apic.error 00 esr 00000000 S:... R:... . apic.timer 00 DCR=3D0000000b(b) initial_count=3D1000090000 apic.icr 00 02000000000c00d1: int=3Dd1 delmod=3D0:Fixed P..E shorthand= =3D3:all dest=3D2 apic.prio 00 apr=3D00(0:0) tpr=3D40(4:0) apic.dest 00 dfr=3Df0(f) ldr=3D01(01) apic.svr 00 0000011f vec=3D1f on focus=3Doff apic.interrupt 00 065:R.E (qemu) info apic-io ioapic ID=3D00 IRR=3D00000000 SEL=3D18 ioapic 00 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 01 0300000000000993: int=3D93 delmod=3D1:LowPri L.H.E. dest=3D3 ioapic 02 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 03 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 04 0300000000000992: int=3D92 delmod=3D1:LowPri L.H.E. dest=3D3 ioapic 05 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 06 02000000000109b3: int=3Db3 delmod=3D1:LowPri L.H.EM dest=3D2 ioapic 07 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 08 01000000000008d1: int=3Dd1 delmod=3D0:Fixed L.H.E. dest=3D1 ioapic 09 03000000000089b1: int=3Db1 delmod=3D1:LowPri L.H.L. dest=3D3 ioapic 10 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 11 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 12 03000000000009a3: int=3Da3 delmod=3D1:LowPri L.H.E. dest=3D3 ioapic 13 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 14 0300000000000962: int=3D62 delmod=3D1:LowPri L.H.E. dest=3D3 ioapic 15 0300000000000982: int=3D82 delmod=3D1:LowPri L.H.E. dest=3D3 ioapic 16 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 17 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 18 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 19 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 20 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 21 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 22 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 ioapic 23 00000000000100ff: int=3Dff delmod=3D0:Fixed P.H.EM dest=3D0 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 part Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev CC: Andreas F=C3=A4rber CC: Paolo Bonzini Pavel Butsykin (9): apic_internal.h: move apic_get_bit(), apic_set_bit() to apic_internal.h 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 disas.c | 10 --- hmp-commands-info.hx | 32 ++++++++ hw/i386/kvm/ioapic.c | 10 +++ hw/intc/apic.c | 20 +---- hw/intc/ioapic.c | 12 +++ hw/intc/ioapic_common.c | 31 ++++++++ include/hw/i386/apic_internal.h | 90 +++++++++++++++++++--- include/hw/i386/ioapic_internal.h | 7 ++ include/hw/i386/pc.h | 5 ++ include/monitor/monitor-common.h | 3 + include/monitor/monitor.h | 1 + monitor.c | 5 +- target-i386/cpu.h | 3 + target-i386/helper.c | 155 ++++++++++++++++++++++++++++++++= ++++++ target-i386/monitor.c | 17 +++++ 15 files changed, 359 insertions(+), 42 deletions(-) --=20 2.1.4