From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Giuseppe Musacchio <thatlemon@gmail.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Richard Henderson <richard.henderson@linaro.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: [PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context()
Date: Fri, 6 Nov 2020 15:27:37 +0000 [thread overview]
Message-ID: <20201106152738.26026-4-peter.maydell@linaro.org> (raw)
In-Reply-To: <20201106152738.26026-1-peter.maydell@linaro.org>
The kernel does not restore the g7 register in sparc64_set_context();
neither should we. (We still save it in sparc64_get_context().)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
linux-user/sparc/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index 43dcd137f51..ed32c7abd17 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -447,7 +447,7 @@ void sparc64_set_context(CPUSPARCState *env)
__get_user(env->gregs[4], (&(*grp)[SPARC_MC_G4]));
__get_user(env->gregs[5], (&(*grp)[SPARC_MC_G5]));
__get_user(env->gregs[6], (&(*grp)[SPARC_MC_G6]));
- __get_user(env->gregs[7], (&(*grp)[SPARC_MC_G7]));
+ /* Skip g7 as that's the thread register in userspace */
/*
* Note that unlike the kernel, we didn't need to mess with the
--
2.20.1
next prev parent reply other threads:[~2020-11-06 15:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 15:27 [PATCH v2 0/4] linux/sparc: more get/set_context fixes Peter Maydell
2020-11-06 15:27 ` [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling Peter Maydell
2020-11-06 17:09 ` Richard Henderson
2020-11-06 17:10 ` Peter Maydell
2020-12-17 11:30 ` Laurent Vivier
2020-11-06 15:27 ` [PATCH v2 2/4] linux-user/sparc: Remove unneeded checks of 'err' from sparc64_get_context() Peter Maydell
2020-11-06 17:10 ` Richard Henderson
2020-12-17 11:32 ` Laurent Vivier
2020-11-06 15:27 ` Peter Maydell [this message]
2020-11-06 17:11 ` [PATCH v2 3/4] linux-user/sparc: Don't restore %g7 in sparc64_set_context() Richard Henderson
2020-12-17 11:33 ` Laurent Vivier
2020-11-06 15:27 ` [PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context() Peter Maydell
2020-11-06 17:22 ` Richard Henderson
2020-12-17 11:33 ` Laurent Vivier
2020-11-06 15:30 ` [PATCH v2 0/4] linux/sparc: more get/set_context fixes Peter Maydell
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=20201106152738.26026-4-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thatlemon@gmail.com \
/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).