qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/5] target/riscv: Remove the HS_TWO_STAGE flag


From: Richard Henderson
Subject: Re: [PATCH v2 3/5] target/riscv: Remove the HS_TWO_STAGE flag
Date: Wed, 28 Oct 2020 08:11:29 -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:
> @@ -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 <richard.henderson@linaro.org>


r~



reply via email to

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