qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Himanshu Chauhan <hchauhan@ventanamicro.com>
Cc: Chang Alvin <vivahavey@gmail.com>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
	 alistair.francis@wdc.com, Andrew Jones <ajones@ventanamicro.com>
Subject: Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp
Date: Tue, 19 Sep 2023 19:27:27 +1000	[thread overview]
Message-ID: <CAKmqyKP5cHzYXO5kBTK9qQYOjdWxRqZeRhVrxRWJBLFDFzgoxA@mail.gmail.com> (raw)
In-Reply-To: <D9FFB2CE-0F2D-4CFA-B4F8-CCBE33D44339@ventanamicro.com>

On Tue, Sep 19, 2023 at 3:43 PM Himanshu Chauhan
<hchauhan@ventanamicro.com> wrote:
>
>
>
> > On 19-Sep-2023, at 10:51 AM, Alistair Francis <alistair23@gmail.com> wrote:
> >
> > On Tue, Sep 19, 2023 at 3:08 PM Chang Alvin <vivahavey@gmail.com> wrote:
> >>
> >>> -----Original Message-----
> >>
> >>> From: Alistair Francis <alistair23@gmail.com>
> >>
> >>> Sent: Tuesday, September 19, 2023 12:42 PM
> >>
> >>> To: Alvin Che-Chia Chang(張哲嘉) <alvinga@andestech.com>
> >>
> >>> Cc: qemu-riscv@nongnu.org; qemu-devel@nongnu.org;
> >>
> >>> alistair.francis@wdc.com; ajones@ventanamicro.com
> >>
> >>> Subject: Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for
> >>
> >>> Smepmp to version 1.0
> >>
> >>>
> >>
> >>> On Fri, Sep 15, 2023 at 6:32 PM Alvin Chang <alvinga@andestech.com> wrote:
> >>
> >>>>
> >>
> >>>> Current checks on writing pmpcfg for Smepmp follows Smepmp version
> >>
> >>>> 0.9.1. However, Smepmp specification has already been ratified, and
> >>
> >>>> there are some differences between version 0.9.1 and 1.0. In this
> >>
> >>>> commit we update the checks of writing pmpcfg to follow Smepmp version
> >>
> >>>> 1.0.
> >>
> >>>>
> >>
> >>>> When mseccfg.MML is set, the constraints to modify PMP rules are:
> >>
> >>>> 1. Locked rules cannot be removed or modified until a PMP reset, unless
> >>
> >>>>   mseccfg.RLB is set.
> >>
> >>>> 2. From Smepmp specification version 1.0, chapter 2 section 4b:
> >>
> >>>>   Adding a rule with executable privileges that either is M-mode-only
> >>
> >>>>   or a locked Shared-Region is not possible and such pmpcfg writes are
> >>
> >>>>   ignored, leaving pmpcfg unchanged.
> >>
> >>>>
> >>
> >>>> The commit transfers the value of pmpcfg into the index of the Smepmp
> >>
> >>>> truth table, and checks the rules by aforementioned specification
> >>
> >>>> changes.
> >>
> >>>>
> >>
> >>>> Signed-off-by: Alvin Chang <alvinga@andestech.com>
> >>
> >>>> ---
> >>
> >>>> Changes from v2: Adopt switch case ranges and numerical order.
> >>
> >>>>
> >>
> >>>> Changes from v1: Convert ePMP over to Smepmp.
> >>
> >>>
> >>
> >>> Did this part get lost?
> >>
> >>>
> >>
> >>> Alistair
> >>
> >>>
> >>
> >>
> >> Sorry, do you mean that the term "ePMP" should be changed to "Smepmp" in source code?
> >
> > We still call it epmp to users and it's still marked as experimental.
> >
> > See this line in the QEMU source:
> >
> > MULTI_EXT_CFG_BOOL("x-epmp", epmp, false),
> >
> > Alistair
>
> I had sent a patch to rename epmp to Smepmp
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg967676.html

Thanks! That patch has some comments that need a v2. Do you mind sending a v2?

Alistair

>
>
> Regards
> Himanshu
>
>


      reply	other threads:[~2023-09-19  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  5:08 [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp Chang Alvin
2023-09-19  5:21 ` Alistair Francis
2023-09-19  5:42   ` Himanshu Chauhan
2023-09-19  9:27     ` Alistair Francis [this message]

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=CAKmqyKP5cHzYXO5kBTK9qQYOjdWxRqZeRhVrxRWJBLFDFzgoxA@mail.gmail.com \
    --to=alistair23@gmail.com \
    --cc=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=hchauhan@ventanamicro.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=vivahavey@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).