qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/9] hmp command IO- and Local APIC dump state
@ 2015-09-15  9:22 Denis V. Lunev
  2015-09-15  9:23 ` [Qemu-devel] [PATCH 1/9] apic_internal.h: move apic_get_bit(), apic_set_bit() to apic_internal.h Denis V. Lunev
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Denis V. Lunev @ 2015-09-15  9:22 UTC (permalink / raw)
  Cc: Denis V. Lunev, Andreas Färber, Paolo Bonzini, qemu-devel,
	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 devices.

(qemu) info apic-local
apic.lvt    00-timer   000300fd int=fd .H.EMP delmod=0:Fixed
apic.lvt    00-thermal 00010000 int=00 .H.EM. delmod=0:Fixed
apic.lvt    00-perfmon 000000fe int=fe .H.E.. delmod=0:Fixed
apic.lvt    00-LINT0   0001001f int=1f .H.EM. delmod=0:Fixed
apic.lvt    00-LINT1   000004ff int=ff .H.E.. delmod=4:NMI
apic.lvt    00-Error   000000e3 int=e3 .H.E.. delmod=0:Fixed
apic.error  00 esr 00000000 S:... R:... .
apic.timer  00 DCR=0000000b(b) initial_count=1000090000
apic.icr    00 02000000000c00d1: int=d1 delmod=0:Fixed P..E shorthand=3:all dest=2
apic.prio   00 apr=00(0:0)  tpr=40(4:0)
apic.dest   00 dfr=f0(f)    ldr=01(01)
apic.svr    00 0000011f vec=1f on focus=off
apic.interrupt  00 065:R.E

(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 02 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 03 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 04 0300000000000992: int=92 delmod=1:LowPri L.H.E. dest=3
ioapic 05 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 06 02000000000109b3: int=b3 delmod=1:LowPri L.H.EM dest=2
ioapic 07 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 08 01000000000008d1: int=d1 delmod=0:Fixed  L.H.E. dest=1
ioapic 09 03000000000089b1: int=b1 delmod=1:LowPri L.H.L. dest=3
ioapic 10 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 11 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 12 03000000000009a3: int=a3 delmod=1:LowPri L.H.E. dest=3
ioapic 13 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 14 0300000000000962: int=62 delmod=1:LowPri L.H.E. dest=3
ioapic 15 0300000000000982: int=82 delmod=1:LowPri L.H.E. dest=3
ioapic 16 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 17 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 18 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 19 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 20 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 21 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 22 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0
ioapic 23 00000000000100ff: int=ff delmod=0:Fixed  P.H.EM dest=0

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 <pbutsykin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Andreas Färber <andreas.faerber@web.de>
CC: Paolo Bonzini <pbonzini@redhat.com>

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(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v3 0/9] hmp command IO- and Local APIC dump state
@ 2015-09-21 10:57 Denis V. Lunev
  2015-09-21 10:57 ` [Qemu-devel] [PATCH 4/9] apic_internal.h: fix formatting and drop unused consts Denis V. Lunev
  0 siblings, 1 reply; 14+ messages in thread
From: Denis V. Lunev @ 2015-09-21 10:57 UTC (permalink / raw)
  Cc: Denis V. Lunev, Paolo Bonzini, qemu-devel, Andreas Färber,
	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 devices.

(qemu) info lapic
dumping local APIC state for CPU 0

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=0x3 (divide by 16) initial_count = 62278
SPIV     0x000001ff APIC enabled, focus=off, spurious vec 255
ICR      0x000000fd physical edge de-assert no
ICR2     0x00000001 cpu 1 (X2APIC ID)
ESR      0x00000000
ISR
IRR      239

APR 0x00 TPR 0x00 DFR 0x0f LDR 0x00 PPR 0x00

(qemu) info ioapic
ioapic id=0x00 sel=0x2e (redir[15])
pin 0  0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 1  0x0000000000000031 dest=0 vec=49  active-hi edge         fixed  physical
pin 2  0x0000000000000030 dest=0 vec=48  active-hi edge         fixed  physical
pin 3  0x0000000000000033 dest=0 vec=51  active-hi edge         fixed  physical
pin 4  0x0000000000010034 dest=0 vec=52  active-hi edge  masked fixed  physical
pin 5  0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 6  0x0000000000000036 dest=0 vec=54  active-hi edge         fixed  physical
pin 7  0x0000000000000037 dest=0 vec=55  active-hi edge         fixed  physical
pin 8  0x0000000000000038 dest=0 vec=56  active-hi edge         fixed  physical
pin 9  0x0000000000018041 dest=0 vec=65  active-hi level masked fixed  physical
pin 10 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 11 0x0300000000008081 dest=3 vec=129 active-hi level        fixed  physical
pin 12 0x000000000000003c dest=0 vec=60  active-hi edge         fixed  physical
pin 13 0x000000000000003d dest=0 vec=61  active-hi edge         fixed  physical
pin 14 0x000000000000003e dest=0 vec=62  active-hi edge         fixed  physical
pin 15 0x000000000000003f dest=0 vec=63  active-hi edge         fixed  physical
pin 16 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 17 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 18 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 19 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 20 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 21 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 22 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 23 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
IRR (none)

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

Changes from v2:
 - lapic and ioapic format dump are fixed for more human readable view

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Andreas Färber <afaerber@suse.de>

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

 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(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH v4 0/9] hmp command IO- and Local APIC dump state
@ 2015-09-22 13:18 Denis V. Lunev
  2015-09-22 13:18 ` [Qemu-devel] [PATCH 4/9] apic_internal.h: fix formatting and drop unused consts Denis V. Lunev
  0 siblings, 1 reply; 14+ messages in thread
From: Denis V. Lunev @ 2015-09-22 13:18 UTC (permalink / raw)
  Cc: Denis V. Lunev, Paolo Bonzini, qemu-devel, Andreas Färber,
	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 devices.

(qemu) info lapic
dumping local APIC state for CPU 0

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=0x3 (divide by 16) initial_count = 61360
SPIV    0x000001ff APIC enabled, focus=off, spurious vec 255
ICR     0x000000fd physical edge de-assert no-shorthand
ICR2    0x00000001 cpu 1 (X2APIC ID)
ESR     0x00000000
ISR     (none)
IRR     239

APR 0x00 TPR 0x00 DFR 0x0f LDR 0x00 PPR 0x00

(qemu) info ioapic
ioapic id=0x00 sel=0x26 (redir[11])
pin 0  0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 1  0x0000000000000031 dest=0 vec=49  active-hi edge         fixed  physical
pin 2  0x0000000000000030 dest=0 vec=48  active-hi edge         fixed  physical
pin 3  0x0000000000000033 dest=0 vec=51  active-hi edge         fixed  physical
pin 4  0x0000000000010034 dest=0 vec=52  active-hi edge  masked fixed  physical
pin 5  0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 6  0x0000000000000036 dest=0 vec=54  active-hi edge         fixed  physical
pin 7  0x0000000000000037 dest=0 vec=55  active-hi edge         fixed  physical
pin 8  0x0000000000000038 dest=0 vec=56  active-hi edge         fixed  physical
pin 9  0x0000000000018041 dest=0 vec=65  active-hi level masked fixed  physical
pin 10 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 11 0x0300000000008091 dest=3 vec=145 active-hi level        fixed  physical
pin 12 0x000000000000003c dest=0 vec=60  active-hi edge         fixed  physical
pin 13 0x000000000000003d dest=0 vec=61  active-hi edge         fixed  physical
pin 14 0x000000000000003e dest=0 vec=62  active-hi edge         fixed  physical
pin 15 0x000000000000003f dest=0 vec=63  active-hi edge         fixed  physical
pin 16 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 17 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 18 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 19 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 20 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 21 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 22 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
pin 23 0x0000000000010000 dest=0 vec=0   active-hi edge  masked fixed  physical
IRR        (none)
Remote IRR (none)


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

Changes from v2:
 - lapic and ioapic format dump are fixed for more human readable view

Changes from v3:
 - added print "(none)" for empty interrupt registers
 - fixed print of destination No-Shorthand
 - added print IRR and Remote IRR as a bitmap in the IO APIC dump

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Andreas Färber <afaerber@suse.de>

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

 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           |  55 +++++++++++
 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              | 191 ++++++++++++++++++++++++++++++++++++++
 target-i386/monitor.c             |  17 ++++
 15 files changed, 426 insertions(+), 43 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-09-22 13:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15  9:22 [Qemu-devel] [PATCH v2 0/9] hmp command IO- and Local APIC dump state Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 1/9] apic_internal.h: move apic_get_bit(), apic_set_bit() to apic_internal.h Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 2/9] apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESS Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 3/9] apic_internal.h: added more constants Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 4/9] apic_internal.h: fix formatting and drop unused consts Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 5/9] monitor: make monitor_fprintf and mon_get_cpu externally visible Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 6/9] hmp: added local apic dump state Denis V. Lunev
2015-09-15 10:20   ` Paolo Bonzini
2015-09-15  9:23 ` [Qemu-devel] [PATCH 7/9] ioapic_internal.h: added more constants Denis V. Lunev
2015-09-15  9:23 ` [Qemu-devel] [PATCH 8/9] hmp: added io apic dump state Denis V. Lunev
2015-09-15 10:32   ` Paolo Bonzini
2015-09-15  9:23 ` [Qemu-devel] [PATCH 9/9] hmp: implemented io apic dump state for TCG Denis V. Lunev
  -- strict thread matches above, loose matches on Subject: below --
2015-09-21 10:57 [Qemu-devel] [PATCH v3 0/9] hmp command IO- and Local APIC dump state Denis V. Lunev
2015-09-21 10:57 ` [Qemu-devel] [PATCH 4/9] apic_internal.h: fix formatting and drop unused consts Denis V. Lunev
2015-09-22 13:18 [Qemu-devel] [PATCH v4 0/9] hmp command IO- and Local APIC dump state Denis V. Lunev
2015-09-22 13:18 ` [Qemu-devel] [PATCH 4/9] apic_internal.h: fix formatting and drop unused consts Denis V. Lunev

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).