qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Atish Patra <atishp@rivosinc.com>, qemu-devel@nongnu.org
Cc: Anup Patel <anup@brainfault.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bin Meng <bin.meng@windriver.com>,
	qemu-riscv@nongnu.org, Palmer Dabbelt <palmer@dabbelt.com>
Subject: Re: [RFC 1/5] target/riscv: Add the privileged spec version 1.12.0
Date: Mon, 24 Jan 2022 18:59:25 +1100	[thread overview]
Message-ID: <fc833a66-c0fe-931a-ab7e-e81917a8d786@linaro.org> (raw)
In-Reply-To: <20220120200735.2739543-2-atishp@rivosinc.com>

On 1/21/22 7:07 AM, Atish Patra wrote:
> Add the definition for ratified privileged specification version v1.12
> 
> Signed-off-by: Atish Patra <atishp@rivosinc.com>
> ---
>   target/riscv/cpu.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 4d630867650a..671f65100b1a 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -82,6 +82,7 @@ enum {
>   
>   #define PRIV_VERSION_1_10_0 0x00011000
>   #define PRIV_VERSION_1_11_0 0x00011100
> +#define PRIV_VERSION_1_12_0 0x00011200

Is there any good reason for defining things this way, as opposed to a simple enumeration?
A simple enum would eliminate the need for


> +    /* The default privilege specification version supported is 1.10 */
> +    if (!csr_min_priv) {
> +        csr_min_priv = PRIV_VERSION_1_10_0;
> +    }

in patch 5.


r~


  reply	other threads:[~2022-01-24  8:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 20:07 [RFC 0/5] Privilege version update Atish Patra
2022-01-20 20:07 ` [RFC 1/5] target/riscv: Add the privileged spec version 1.12.0 Atish Patra
2022-01-24  7:59   ` Richard Henderson [this message]
2022-01-29  0:52     ` Atish Kumar Patra
2022-01-31  6:33       ` Alistair Francis
2022-01-20 20:07 ` [RFC 2/5] target/riscv: Introduce privilege version field in the CSR ops Atish Patra
2022-01-24  7:56   ` Richard Henderson
2022-01-29  0:52     ` Atish Kumar Patra
2022-01-20 20:07 ` [RFC 3/5] target/riscv: Add support for mconfigptr Atish Patra
2022-01-20 20:07 ` [RFC 4/5] target/riscv: Add *envcfg* CSRs support Atish Patra
2022-01-26  8:37   ` Weiwei Li
2022-01-29  1:28     ` Atish Patra
2022-01-29  1:50       ` angell1518
2022-01-31 20:05         ` Atish Kumar Patra
2022-02-03 12:23   ` Heiko Stübner
2022-02-03 20:39     ` Atish Kumar Patra
2022-01-20 20:07 ` [RFC 5/5] target/riscv: Enable privileged spec version 1.12 Atish Patra
2022-01-24 13:32   ` Christoph Müllner

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=fc833a66-c0fe-931a-ab7e-e81917a8d786@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=anup@brainfault.org \
    --cc=atishp@rivosinc.com \
    --cc=bin.meng@windriver.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@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).