riscv-isa-sim icon indicating copy to clipboard operation
riscv-isa-sim copied to clipboard

Move 'h' from --isa to --priv

Open chihminchao opened this issue 3 years ago • 4 comments

For some reason, the --isa string doesn't include big privilege extension and the privilege capability are specified by --priv. The convention is the same as the string in dts and match the "Subset Naming Convention" in user spec. However, the 'h', hypvervisor, extension is an exception at present. Do it need to be moved to --priv ?

chihminchao avatar Oct 26 '21 07:10 chihminchao

I don't have an opinion yet, but I'll also offer an alternative: unify priv with isa. For example, --isa=rv64gc_sv39_h could imply M/S/U + H extension. (Sv39 implies S-mode, of course.)

The downside to this approach is that --isa=rv64gc would imply M-mode only, so we'd create a backwards incompatibility in the API (and, secondarily, ISA strings would get longer). But maybe it's desirable anyway, because it's arguably less hacky than the current scheme.

aswaterman avatar Oct 26 '21 07:10 aswaterman

:+1: for this proposal.

If (and only if) --priv and --isa should be merged (as proposed by @aswaterman), I would prefer ISA/privilege delimiter other than _ (which is already used by ISA naming conventions). How about :?

Edit: added "(and only if)" to avoid confusion a little.

a4lg avatar Nov 27 '21 05:11 a4lg

We should not invent a new convention for Spike. We need to standardize this naming at RVI then adopt that convention.

Using a colon is really no different than the existing scheme, IMO: the problem is that it’s nonstandard.

aswaterman avatar Nov 27 '21 06:11 aswaterman

@aswaterman I agree that (it's just a bit better, but nothing more).

a4lg avatar Nov 27 '21 06:11 a4lg