All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Michel <lmichel@kalray.eu>
To: qemu-devel@nongnu.org
Cc: "Luc Michel" <lmichel@kalray.eu>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Peter Maydell" <peter.maydell@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: [PATCH 5/7] target/mips: use semihosting_exit_request on semihosted exit syscall
Date: Mon, 20 Jun 2022 16:24:24 +0200	[thread overview]
Message-ID: <20220620142426.15040-7-lmichel@kalray.eu> (raw)
In-Reply-To: <20220620142426.15040-1-lmichel@kalray.eu>

Use the new semihosting_exit_request instead of a call to exit when
handling a semihosted exit syscall.

Signed-off-by: Luc Michel <lmichel@kalray.eu>
---
 target/mips/tcg/sysemu/mips-semi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/mips/tcg/sysemu/mips-semi.c b/target/mips/tcg/sysemu/mips-semi.c
index b4a383ae90..94be486925 100644
--- a/target/mips/tcg/sysemu/mips-semi.c
+++ b/target/mips/tcg/sysemu/mips-semi.c
@@ -245,11 +245,11 @@ void helper_do_semihosting(CPUMIPSState *env)
     char *p, *p2;
 
     switch (op) {
     case UHI_exit:
         qemu_log("UHI(%d): exit(%d)\n", op, (int)gpr[4]);
-        exit(gpr[4]);
+        semihosting_exit_request(gpr[4]);
     case UHI_open:
         GET_TARGET_STRING(p, gpr[4]);
         if (!strcmp("/dev/stdin", p)) {
             gpr[2] = 0;
         } else if (!strcmp("/dev/stdout", p)) {
-- 
2.17.1



  parent reply	other threads:[~2022-06-20 14:28 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 ` Luc Michel [this message]
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 ` [PATCH 0/7] semihosting: proper QEMU exit " Peter Maydell
2022-06-20 15:10   ` 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=20220620142426.15040-7-lmichel@kalray.eu \
    --to=lmichel@kalray.eu \
    --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=marex@denx.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.