qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Risc-V/gdb: replace exit calls with proper shutdown
@ 2023-09-07 11:26 Clément Chigot
  2023-09-07 11:26 ` [PATCH v3 1/5] softmmu: add means to pass an exit code when requesting a shutdown Clément Chigot
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Clément Chigot @ 2023-09-07 11:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-riscv, peter.maydell, alistair23, Clément Chigot

This series replaces some of the call to exit in hardware used by
Risc-V boards or made when gdb is requested to exit by shutdown
requests. 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 v2:
 - Add support to request a shutdown with a specific exit code.
 - Pass the exit code of the main loop to gdb_exit call in qemu_cleanup
 - gdbstub: move the request shutdown in a new new function to avoid
   having to worry about the request having already been sent.

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

-- 
2.25.1



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

end of thread, other threads:[~2023-10-09  1:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 11:26 [PATCH v3 0/5] Risc-V/gdb: replace exit calls with proper shutdown Clément Chigot
2023-09-07 11:26 ` [PATCH v3 1/5] softmmu: add means to pass an exit code when requesting a shutdown Clément Chigot
2023-09-18  2:03   ` Alistair Francis
2023-09-07 11:26 ` [PATCH v3 2/5] softmmu: pass the main loop status to gdb "Wxx" packet Clément Chigot
2023-09-18  2:05   ` Alistair Francis
2023-09-07 11:26 ` [PATCH v3 3/5] hw/misc/sifive_test.c: replace exit calls with proper shutdown Clément Chigot
2023-09-18  2:06   ` Alistair Francis
2023-09-07 11:26 ` [PATCH v3 4/5] hw/char: riscv_htif: " Clément Chigot
2023-09-18  2:07   ` Alistair Francis
2023-09-22  5:20   ` Alistair Francis
2023-10-02  9:32     ` Clément Chigot
2023-10-09  1:21       ` Alistair Francis
2023-09-07 11:26 ` [PATCH v3 5/5] gdbstub: replace exit calls with proper shutdown for softmmu Clément Chigot
2023-09-18  2:09   ` Alistair Francis

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