[PATCH v2 0/2] mconfigptr support

Rahul Pathak posted 2 patches 2 years, 6 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211025124319.195290-1-rpathak@ventanamicro.com
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>
target/riscv/cpu.c      |  4 +++-
target/riscv/cpu.h      |  1 +
target/riscv/cpu_bits.h |  1 +
target/riscv/csr.c      | 19 +++++++++++++++----
4 files changed, 20 insertions(+), 5 deletions(-)
[PATCH v2 0/2] mconfigptr support
Posted by Rahul Pathak 2 years, 6 months ago
Patches add the mconfigptr csr support. 
mconfigptr is newly incorporated in risc-v privileged architecture
specification 1.12 version. 
priv spec 1.12.0 version check is also added.


qemu-system-riscv64 -nographic -machine virt -cpu rv64,priv_spec=v1.12.0

Changelog:

v1->v2
------
1. Added privileged architecture spec version 1.12 ("v1.12.0") check
2. Added predicate function for mconfigptr which verifies
for priv spec version v1.12.0 or higher.

Thanks
Rahul

Rahul Pathak (2):
  target/riscv: Add priv spec 1.12.0 version check
  target/riscv: csr: Implement mconfigptr CSR

 target/riscv/cpu.c      |  4 +++-
 target/riscv/cpu.h      |  1 +
 target/riscv/cpu_bits.h |  1 +
 target/riscv/csr.c      | 19 +++++++++++++++----
 4 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.25.1


Re: [PATCH v2 0/2] mconfigptr support
Posted by Alistair Francis 2 years, 6 months ago
On Mon, Oct 25, 2021 at 10:51 PM Rahul Pathak <rpathak@ventanamicro.com> wrote:
>
> Patches add the mconfigptr csr support.
> mconfigptr is newly incorporated in risc-v privileged architecture
> specification 1.12 version.
> priv spec 1.12.0 version check is also added.
>
>
> qemu-system-riscv64 -nographic -machine virt -cpu rv64,priv_spec=v1.12.0

Thanks for the patches!

I gave some comments in line with the code changes. Overall this looks
good, we just need to add the other v1.12.0 features.

Alistair

>
> Changelog:
>
> v1->v2
> ------
> 1. Added privileged architecture spec version 1.12 ("v1.12.0") check
> 2. Added predicate function for mconfigptr which verifies
> for priv spec version v1.12.0 or higher.
>
> Thanks
> Rahul
>
> Rahul Pathak (2):
>   target/riscv: Add priv spec 1.12.0 version check
>   target/riscv: csr: Implement mconfigptr CSR
>
>  target/riscv/cpu.c      |  4 +++-
>  target/riscv/cpu.h      |  1 +
>  target/riscv/cpu_bits.h |  1 +
>  target/riscv/csr.c      | 19 +++++++++++++++----
>  4 files changed, 20 insertions(+), 5 deletions(-)
>
> --
> 2.25.1
>
>

Re: [PATCH v2 0/2] mconfigptr support
Posted by Rahul Pathak 2 years, 6 months ago
On Wed, Oct 27, 2021 at 8:14 AM Alistair Francis <alistair23@gmail.com>
wrote:

> On Mon, Oct 25, 2021 at 10:51 PM Rahul Pathak <rpathak@ventanamicro.com>
> wrote:
> >
> > Patches add the mconfigptr csr support.
> > mconfigptr is newly incorporated in risc-v privileged architecture
> > specification 1.12 version.
> > priv spec 1.12.0 version check is also added.
> >
> >
> > qemu-system-riscv64 -nographic -machine virt -cpu rv64,priv_spec=v1.12.0
>
> Thanks for the patches!
>
> I gave some comments in line with the code changes. Overall this looks
> good, we just need to add the other v1.12.0 features.
>
> Alistair


Thanks Alistair, I will work on the comments and send the
next version.

>
>
>
> > Changelog:
> >
> > v1->v2
> > ------
> > 1. Added privileged architecture spec version 1.12 ("v1.12.0") check
> > 2. Added predicate function for mconfigptr which verifies
> > for priv spec version v1.12.0 or higher.
> >
> > Thanks
> > Rahul
> >
> > Rahul Pathak (2):
> >   target/riscv: Add priv spec 1.12.0 version check
> >   target/riscv: csr: Implement mconfigptr CSR
> >
> >  target/riscv/cpu.c      |  4 +++-
> >  target/riscv/cpu.h      |  1 +
> >  target/riscv/cpu_bits.h |  1 +
> >  target/riscv/csr.c      | 19 +++++++++++++++----
> >  4 files changed, 20 insertions(+), 5 deletions(-)
> >
> > --
> > 2.25.1
> >
> >
>