On 10/28/20 7:42 AM, Alistair Francis wrote:
> @@ -337,7 +324,8 @@ static int get_physical_address(CPURISCVState *env,
> hwaddr *physical,
> * was called. Background registers will be used if the guest has
> * forced a two stage translation to be on (in HS or M mode).
> */
> - if (riscv_cpu_two_stage_lookup(env) && access_type != MMU_INST_FETCH) {
> + if ((!riscv_cpu_virt_enabled(env) && riscv_cpu_two_stage_lookup(mmu_idx))
> + && access_type != MMU_INST_FETCH) {
This access_type check looks like a bug. And possibly why you said that you
can't use code access for the execute load helpers.
Otherwise,
Reviewed-by: Richard Henderson <[email protected]>
r~