From: Peter Maydell <peter.maydell@linaro.org>
To: Amir Gonnen <amir.gonnen@neuroblade.ai>
Cc: Marek Vasut <marex@denx.de>, Chris Wulff <crwulff@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v3 1/5] target/nios2: Check supervisor on eret
Date: Fri, 4 Mar 2022 12:57:15 +0000 [thread overview]
Message-ID: <CAFEAcA8YwGaA9M2oA9MBCfpV-QPeAsAanv8xotH_Cn1tTiBcmA@mail.gmail.com> (raw)
In-Reply-To: <20220303153906.2024748-2-amir.gonnen@neuroblade.ai>
On Thu, 3 Mar 2022 at 15:39, Amir Gonnen <amir.gonnen@neuroblade.ai> wrote:
>
> eret instruction is only allowed in supervisor mode.
>
> Signed-off-by: Amir Gonnen <amir.gonnen@neuroblade.ai>
> ---
> target/nios2/translate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/nios2/translate.c b/target/nios2/translate.c
> index ce3aacf59d..007c17e6e9 100644
> --- a/target/nios2/translate.c
> +++ b/target/nios2/translate.c
> @@ -384,6 +384,8 @@ static const Nios2Instruction i_type_instructions[] = {
> */
> static void eret(DisasContext *dc, uint32_t code, uint32_t flags)
> {
> + gen_check_supervisor(dc);
> +
> tcg_gen_mov_tl(cpu_R[CR_STATUS], cpu_R[CR_ESTATUS]);
> tcg_gen_mov_tl(cpu_R[R_PC], cpu_R[R_EA]);
>
> --
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
next prev parent reply other threads:[~2022-03-04 12:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 15:39 [PATCH v3 0/5] target/nios2: Shadow register set, EIC and VIC Amir Gonnen
2022-03-03 15:39 ` [PATCH v3 1/5] target/nios2: Check supervisor on eret Amir Gonnen
2022-03-04 12:57 ` Peter Maydell [this message]
2022-03-04 20:58 ` Richard Henderson
2022-03-03 15:39 ` [PATCH v3 2/5] target/nios2: Shadow register set Amir Gonnen
2022-03-04 21:45 ` Richard Henderson
2022-03-03 15:39 ` [PATCH v3 3/5] target/nios2: Exteral Interrupt Controller (EIC) Amir Gonnen
2022-03-04 22:25 ` Richard Henderson
2022-03-03 15:39 ` [PATCH v3 4/5] hw/intc: Vectored Interrupt Controller (VIC) Amir Gonnen
2022-03-04 12:55 ` Peter Maydell
2022-03-03 15:39 ` [PATCH v3 5/5] hw/nios2: Machine with a Vectored Interrupt Controller Amir Gonnen
2022-03-04 12:58 ` 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=CAFEAcA8YwGaA9M2oA9MBCfpV-QPeAsAanv8xotH_Cn1tTiBcmA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=amir.gonnen@neuroblade.ai \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--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).