Skip to content

hmp command IO- and Local APIC dump state

Denis V. Lunev qemu-devel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 0 repliesNew
  2. v39 patches 3 repliesSuperseded
  3. v29 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches8 repliesSuperseded

Changes in v4 from the cover letter

- 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

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9apic_internal.h: make some apic_get_* functions externally visiblehw/intc/apic.c include/hw/i386/apic_internal.h+19 -170 replies
2/9apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESShw/intc/apic.c include/hw/i386/apic_internal.h+3 -30 replies
3/9apic_internal.h: added more constantsinclude/hw/i386/apic_internal.h+58 -00 replies
4/9apic_internal.h: fix formatting and drop unused constsinclude/hw/i386/apic_internal.h+7 -90 replies
5/9monitor: make monitor_fprintf and mon_get_cpu externally visibledisas.c include/monitor/hmp-target.h include/monitor/monitor.h +1 more+4 -130 replies
6/9hmp: added local apic dump statehmp-commands-info.hx include/monitor/hmp-target.h target-i386/cpu.h +2 more+217 -00 replies
7/9ioapic_internal.h: added more constantsinclude/hw/i386/ioapic_internal.h+5 -00 replies
8/9hmp: added io apic dump statehmp-commands-info.hx hw/i386/kvm/ioapic.c hw/intc/ioapic_common.c +4 more+97 -00 replies
9/9hmp: implemented io apic dump state for TCGhw/intc/ioapic.c include/hw/i386/pc.h target-i386/monitor.c+15 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/9] hmp command IO- and Local APIC dump state

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

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(-)
Signature · 1 line
2.1.4