[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] target/riscv: Remove the hyp load and store functions
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 4/5] target/riscv: Remove the hyp load and store functions |
Date: |
Wed, 28 Oct 2020 08:18:27 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 10/28/20 7:42 AM, Alistair Francis wrote:
> +void helper_hyp_access_check(CPURISCVState *env)
> {
> if (env->priv == PRV_M ||
> (env->priv == PRV_S && !riscv_cpu_virt_enabled(env)) ||
> (env->priv == PRV_U && !riscv_cpu_virt_enabled(env) &&
> get_field(env->hstatus, HSTATUS_HU))) {
> return;
> }
While this works, I think it would be better to compute this into one bit of
TBFLAGS. Then you can test it during translate and do not need an external
helper at all for the data accesses.
It also means that patch 5 can be simplified...
r~
- [PATCH v2 0/5] Fix the Hypervisor access functions, Alistair Francis, 2020/10/28
- [PATCH v2 1/5] target/riscv: Add a virtualised MMU Mode, Alistair Francis, 2020/10/28
- [PATCH v2 2/5] target/riscv: Set the virtualised MMU mode when doing hyp accesses, Alistair Francis, 2020/10/28
- [PATCH v2 3/5] target/riscv: Remove the HS_TWO_STAGE flag, Alistair Francis, 2020/10/28
- [PATCH v2 4/5] target/riscv: Remove the hyp load and store functions, Alistair Francis, 2020/10/28
- Re: [PATCH v2 4/5] target/riscv: Remove the hyp load and store functions,
Richard Henderson <=
- [PATCH v2 5/5] target/riscv: Split the Hypervisor execute load helpers, Alistair Francis, 2020/10/28