On Mon, May 04, 2026 at 03:43:30PM -0300, Daniel Henrique Barboza wrote:
...
> > > diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h
> > > index 30dcdcfaae..a150acd151 100644
> > > --- a/target/riscv/cpu-qom.h
> > > +++ b/target/riscv/cpu-qom.h
> > > @@ -42,6 +42,7 @@
> > >   #define TYPE_RISCV_CPU_RVA22S64         RISCV_CPU_TYPE_NAME("rva22s64")
> > >   #define TYPE_RISCV_CPU_RVA23U64         RISCV_CPU_TYPE_NAME("rva23u64")
> > >   #define TYPE_RISCV_CPU_RVA23S64         RISCV_CPU_TYPE_NAME("rva23s64")
> > > +#define TYPE_RISCV_CPU_RVSERVER_REF     
> > > RISCV_CPU_TYPE_NAME("riscv-server-ref")
> > >   #define TYPE_RISCV_CPU_IBEX             
> > > RISCV_CPU_TYPE_NAME("lowrisc-ibex")
> > >   #define TYPE_RISCV_CPU_SHAKTI_C         RISCV_CPU_TYPE_NAME("shakti-c")
> > >   #define TYPE_RISCV_CPU_SIFIVE_E         RISCV_CPU_TYPE_NAME("sifive-e")
> > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> > > index 586683b28a..4b59dcabff 100644
> > > --- a/target/riscv/cpu.c
> > > +++ b/target/riscv/cpu.c
> > > @@ -3401,6 +3401,17 @@ static const TypeInfo riscv_cpu_type_infos[] = {
> > >   #endif
> > >       ),
> > > 
> > > +    DEFINE_RISCV_CPU(TYPE_RISCV_CPU_RVSERVER_REF, TYPE_RISCV_BARE_CPU,
> > > +        .misa_mxl_max = MXL_RV64,
> > > +        .profile = &RVA23S64,
> > > +
> > > +        .cfg.ext_zkr = true,
> > > +        .cfg.ext_svadu = true,
> > > +        .cfg.ext_sdext = true,
> > > +
> > > +        .cfg.max_satp_mode = VM_1_10_SV57,
> > 
> > Why not SV48?
> 
> I tried so hard to come up with a good explanation but failed :) from what I 
> can
> tell in the version history we changed it from sv48 to sv57 starting on v3, 
> and
> never looked back.  There's no apparent reason/discussion related to this 
> change,
> therefore I'll assume that this was a fluke.
> 
> 
> I'll change it back to sv48 in v6. Thanks,
>

Yes, we want sv48 here for the default (base) for the same reason we set
the rva23 profile default/base to sv39 - it's the minimum mandate by the
spec. That allows users to test their software on the default model in
order to ensure compatibility with all conforming implementations. And,
in both the server platform and the profile spec cases, additional,
optional extension support is allowed, so -cpu riscv-server-ref,sv57=on
should also work.

Thanks,
drew

Reply via email to