From: Peter Maydell <peter.maydell@linaro.org>
To: Luc Michel <lmichel@kalray.eu>
Cc: qemu-devel@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Laurent Vivier" <laurent@vivier.eu>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Chris Wulff" <crwulff@gmail.com>, "Marek Vasut" <marex@denx.de>,
"Max Filippov" <jcmvbkbc@gmail.com>
Subject: Re: [PATCH 0/7] semihosting: proper QEMU exit on semihosted exit syscall
Date: Mon, 20 Jun 2022 15:35:26 +0100 [thread overview]
Message-ID: <CAFEAcA-++01L_S=G13AtMO9n4H0vvHZf3M68SOTAJ4sOzu9KGw@mail.gmail.com> (raw)
In-Reply-To: <20220620142426.15040-1-lmichel@kalray.eu>
On Mon, 20 Jun 2022 at 15:25, Luc Michel <lmichel@kalray.eu> wrote:
> This series implements a clean way for semihosted exit syscalls to
> terminate QEMU with a given return code.
>
> Until now, exit syscalls implementations consisted in calling exit()
> with the wanted return code. The problem with this approach is that
> other CPUs are not properly stopped, leading to possible crashes in
> MTTCG mode, especially when at_exit callbacks have been registered. This
> can be the case e.g., when plugins are in use. Plugins can register
> at_exit callbacks. Those will be called on the CPU thread the exit
> syscall is comming from, while other CPUs can continue to run and thus
> call other plugin callbacks.
The other option would be to say "if you register an atexit
callback in your plugin that's your problem to sort out" :-)
There's lots of situations where code inside QEMU might just
call exit(), not just this one. (Mostly these are "we detected
an error and decided to just bail out" codepaths.)
Is there a situation where we get a crash that doesn't involve
code in a plugin doing something odd?
thanks
-- PMM
next prev parent reply other threads:[~2022-06-20 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 14:24 [PATCH 0/7] semihosting: proper QEMU exit on semihosted exit syscall Luc Michel
2022-06-20 14:24 ` [PATCH] accel/tcg/cpu-exec: fix precise single-stepping after interrupt Luc Michel
2022-06-20 14:27 ` Luc Michel
2022-06-20 14:24 ` [PATCH 1/7] softmmu: add qemu_[set|get]_exit_status functions Luc Michel
2022-06-20 14:24 ` [PATCH 2/7] semihosting: add the semihosting_exit_request function Luc Michel
2022-06-20 14:24 ` [PATCH 3/7] semihosting/arm-compat-semi: use semihosting_exit_request Luc Michel
2022-06-20 14:24 ` [PATCH 4/7] target/m68k: use semihosting_exit_request on semihosted exit syscall Luc Michel
2022-06-20 14:24 ` [PATCH 5/7] target/mips: " Luc Michel
2022-06-20 14:24 ` [PATCH 6/7] target/nios2: " Luc Michel
2022-06-20 14:24 ` [PATCH 7/7] target/xtensa: " Luc Michel
2022-06-20 14:35 ` Peter Maydell [this message]
2022-06-20 15:10 ` [PATCH 0/7] semihosting: proper QEMU exit " Luc Michel
2022-06-20 16:12 ` Peter Maydell
2022-06-20 15:59 ` Richard Henderson
2022-06-20 19:08 ` Luc Michel
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='CAFEAcA-++01L_S=G13AtMO9n4H0vvHZf3M68SOTAJ4sOzu9KGw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=crwulff@gmail.com \
--cc=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=jcmvbkbc@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=laurent@vivier.eu \
--cc=lmichel@kalray.eu \
--cc=marex@denx.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).