From: Richard Henderson <richard.henderson@linaro.org>
To: "Ilya Leoshkevich" <iii@linux.ibm.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] linux-user/sparc: Handle "ta 5"
Date: Wed, 1 Feb 2023 09:49:15 -1000 [thread overview]
Message-ID: <48a2f056-618b-c5d6-0f1c-18886e5da51f@linaro.org> (raw)
In-Reply-To: <20230201004609.3005029-4-iii@linux.ibm.com>
On 1/31/23 14:46, Ilya Leoshkevich wrote:
> GCC lowers __builtin_trap() to "ta 5", which in turn generates trap
> 0x105. Follow what kernel's bad_trap() is doing there.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> linux-user/sparc/cpu_loop.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
> index 434c90a55f8..fa36d452a51 100644
> --- a/linux-user/sparc/cpu_loop.c
> +++ b/linux-user/sparc/cpu_loop.c
> @@ -225,6 +225,9 @@ void cpu_loop (CPUSPARCState *env)
> restore_window(env);
> break;
> #ifndef TARGET_ABI32
> + case 0x105:
> + force_sig_fault(TARGET_SIGILL, ILL_ILLTRP, env->pc);
> + break;
> case 0x16e:
> flush_windows(env);
> sparc64_get_context(env);
Quite a lot of ttable{32,64}.S is missing here. We should certainly make use of TT_TRAP,
instead of hard-coding 0x100 vs 0x80.
r~
next prev parent reply other threads:[~2023-02-01 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 0:46 [PATCH 0/4] Fix deadlock when dying because of a signal Ilya Leoshkevich
2023-02-01 0:46 ` [PATCH 1/4] cpus: Make {start,end}_exclusive() recursive Ilya Leoshkevich
2023-02-01 13:07 ` Ilya Leoshkevich
2023-02-01 19:58 ` Richard Henderson
2023-02-01 0:46 ` [PATCH 2/4] linux-user/microblaze: Handle privileged exception Ilya Leoshkevich
2023-02-01 19:35 ` Richard Henderson
2023-02-01 0:46 ` [PATCH 3/4] linux-user/sparc: Handle "ta 5" Ilya Leoshkevich
2023-02-01 19:49 ` Richard Henderson [this message]
2023-02-01 0:46 ` [PATCH 4/4] tests/tcg/linux-test: Add linux-fork-trap test Ilya Leoshkevich
2023-02-01 19:52 ` Richard Henderson
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=48a2f056-618b-c5d6-0f1c-18886e5da51f@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=borntraeger@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=qemu-devel@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).