Skip to content

Risc-V/gdb: replace exit calls with proper shutdown

Clément Chigot qemu-devel qemu-riscv 4 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 1 replyApplied
  2. v35 patches 8 repliesSuperseded
  3. v23 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches4 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/5softmmu: add means to pass an exit code when requesting a shutdowninclude/sysemu/runstate.h softmmu/runstate.c+13 -10 replies
2/5softmmu: pass the main loop status to gdb "Wxx" packetinclude/sysemu/sysemu.h softmmu/main.c softmmu/runstate.c+4 -40 replies
3/5hw/misc/sifive_test.c: replace exit calls with proper shutdownhw/misc/sifive_test.c+7 -20 replies
4/5hw/char: riscv_htif: replace exit calls with proper shutdownhw/char/riscv_htif.c+4 -10 replies
5/5gdbstub: replace exit calls with proper shutdown for softmmugdbstub/gdbstub.c gdbstub/softmmu.c gdbstub/user.c +1 more+24 -20 replies

Reviews trailers per patch

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

PatchAlistair Francis
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-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/5] Risc-V/gdb: replace exit calls with proper shutdown

This series replaces some of the call to exit in hardware used by Risc-V boards. Otherwise, the gdb connection can be abruptly disconnected resulting in the last gdb packet "Wxx" being not sent.

For the gdbstub modification, gdb_exit calls ensure that the "Wxx" packet is sent before exiting. However, some features (see net/vhost-vdpa.c: vhost_vdpa_cleanup for example) are expecting that a cleanup is being made before exiting. This, it's probably safer to follow the same logic here as well.

Difference with v3:
- Rebase on riscv-to-apply

Clément Chigot (5):
softmmu: add means to pass an exit code when requesting a shutdown
softmmu: pass the main loop status to gdb "Wxx" packet hw/misc/sifive_test.c: replace exit calls with proper shutdown hw/char: riscv_htif: replace exit calls with proper shutdown
gdbstub: replace exit calls with proper shutdown for softmmu

 gdbstub/gdbstub.c          |  5 +++--
 gdbstub/softmmu.c          |  6 ++++++
 gdbstub/user.c             |  6 ++++++
 hw/char/riscv_htif.c       |  5 ++++-
 hw/misc/sifive_test.c      |  9 +++++++--
 include/gdbstub/syscalls.h |  9 +++++++++
 include/sysemu/runstate.h  |  2 ++
 include/sysemu/sysemu.h    |  2 +-
 softmmu/main.c             |  2 +-
 softmmu/runstate.c         | 16 +++++++++++++---
 10 files changed, 52 insertions(+), 10 deletions(-)
Signature · 1 line
2.25.1