qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 03/17] target/riscv: save and restore elp state on priv tr


From: Alistair Francis
Subject: Re: [PATCH v9 03/17] target/riscv: save and restore elp state on priv transitions
Date: Tue, 27 Aug 2024 14:03:50 +1000

On Tue, Aug 27, 2024 at 1:58 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 8/27/24 13:53, Alistair Francis wrote:
> > Exposing the *envcfg CSRs to userspace seems tricky as everything is
> > currently built with the S/M CSRs removed from user builds.
>
> It is as simple as moving them out of ifdefs, then initializing them as 
> needed in reset
> for CONFIG_USER_ONLY.  That's what we do for Arm.

Is that really better though?

Then we have these CSRs that are included in the build, so people can
write code that checks the CSRs, but they are never actually changed.

I guess it simplified the CONFIG_USER_ONLY checks, which is handy and
your original point. But it seems like it is clunky that we have these
CSRs that are kind of fake

Alistair

>
>
> r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]