qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, peter.maydell@linaro.org,
	alistair23@gmail.com, "Clément Chigot" <chigot@adacore.com>
Subject: [PATCH v4 0/5] Risc-V/gdb: replace exit calls with proper shutdown
Date: Tue,  3 Oct 2023 09:14:22 +0200	[thread overview]
Message-ID: <20231003071427.188697-1-chigot@adacore.com> (raw)

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

-- 
2.25.1



             reply	other threads:[~2023-10-03  7:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  7:14 Clément Chigot [this message]
2023-10-03  7:14 ` [PATCH v4 1/5] softmmu: add means to pass an exit code when requesting a shutdown Clément Chigot
2023-10-03  7:14 ` [PATCH v4 2/5] softmmu: pass the main loop status to gdb "Wxx" packet Clément Chigot
2023-10-03  7:14 ` [PATCH v4 3/5] hw/misc/sifive_test.c: replace exit calls with proper shutdown Clément Chigot
2023-10-03  7:14 ` [PATCH v4 4/5] hw/char: riscv_htif: " Clément Chigot
2023-10-03  7:14 ` [PATCH v4 5/5] gdbstub: replace exit calls with proper shutdown for softmmu Clément Chigot
2023-10-05  1:45 ` [PATCH v4 0/5] Risc-V/gdb: replace exit calls with proper shutdown Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231003071427.188697-1-chigot@adacore.com \
    --to=chigot@adacore.com \
    --cc=alistair23@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).