Skip to content

To add HMP interface to dump PCI MSI-X table/PBA

Dongli Zhang qemu-devel 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v33 patches 4 repliesSuperseded
  3. v2 posting 2/23 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/23 patches0 repliesSuperseded
v1 RFC1 patch14 repliesSuperseded

Changes in v4 from the cover letter

- Rework commit message to explain why only HMP (suggested by Markus Armbruster)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3msix/hmp: add hmp interface to dump MSI-X infohmp-commands-info.hx hw/pci/msix.c hw/pci/pci-stub.c +3 more+109 -00 replies
2/3msix/hmp: add interface to dump device specific infohmp-commands-info.hx include/hw/pci/pci.h softmmu/qdev-monitor.c+18 -30 replies
3/3virtio-pci/hmp: implement device specific hmp interfacehw/virtio/virtio-pci.c hw/virtio/virtio.c include/hw/virtio/virtio.h+34 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDr. David Alan GilbertJason Wang
1/3A-b A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] To add HMP interface to dump PCI MSI-X table/PBA

This is v4 to rework commit message to explain why only HMP.

Changed since RFC v1:
- Add heading to MSI-X table (suggested by David Alan Gilbert)
- Add device specific interface, e.g., to dump virtio-pci queue-to-vector mapping (Suggested By Jason)

Changed since v2:
- Add msix_present() to pci-stub.c to avoid build error

Changed since v3:
- Rework commit message to explain why only HMP (suggested by Markus Armbruster)

This patch is to introduce the new HMP command to dump the MSI-X table/PBA.

Here is the RFC v1:

https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg04673.html

The idea was inspired by below discussion:

https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg09020.html

(qemu) info msix -d /machine/peripheral/vscsi0
Msg L.Addr Msg U.Addr Msg Data Vect Ctrl
0xfee00000 0x00000000 0x00004041 0x00000000 0xfee00000 0x00000000 0x00004051 0x00000000 0xfee00000 0x00000000 0x00004061 0x00000000 0xfee00000 0x00000000 0x00004071 0x00000000 0xfee01000 0x00000000 0x000040b1 0x00000000 0xfee02000 0x00000000 0x000040c1 0x00000000 0xfee03000 0x00000000 0x000040d1 0x00000000

MSI-X PBA
0 0 0 0 0 0 0

virtio pci vector info:
config: 0
queue 0: 1
queue 1: 2
queue 2: 3
queue 3: 4
queue 4: 5
queue 5: 6

 hmp-commands-info.hx       | 14 +++++++++
 hw/pci/msix.c              | 63 +++++++++++++++++++++++++++++++++++++++++
 hw/pci/pci-stub.c          |  5 ++++
 hw/virtio/virtio-pci.c     | 22 ++++++++++++++
 hw/virtio/virtio.c         | 10 +++++++
 include/hw/pci/msix.h      |  2 ++
 include/hw/pci/pci.h       |  3 ++
 include/hw/virtio/virtio.h |  2 ++
 include/monitor/hmp.h      |  1 +
 softmmu/qdev-monitor.c     | 36 +++++++++++++++++++++++
 10 files changed, 158 insertions(+)

Thank you very much!

Dongli Zhang