Re: [RFC PATCH 17/18] target/riscv: Pass first/last to get_physical_address_pmp

Philippe Mathieu-Daudé <[email protected]>
Newsgroups org.nongnu.qemu-devel,org.nongnu.qemu-arm,org.nongnu.qemu-riscv
Message-ID <[email protected]>
On 15/8/26 22:37, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <[email protected]>
> ---
>   target/riscv/tcg/cpu_helper.c | 48 +++++++++++++++++++----------------
>   1 file changed, 26 insertions(+), 22 deletions(-)
> 
> diff --git a/target/riscv/tcg/cpu_helper.c b/target/riscv/tcg/cpu_helper.c
> index 3318e82ea7..fb1250a4b8 100644
> --- a/target/riscv/tcg/cpu_helper.c
> +++ b/target/riscv/tcg/cpu_helper.c
> @@ -899,12 +899,13 @@ void riscv_cpu_set_mode(CPURISCVState *env, privilege_mode_t newpriv,
>    *
>    * @env: CPURISCVState
>    * @prot: The returned protection attributes
> - * @addr: The physical address to be checked permission
> + * @first, @last: The physical address range to be permission checked
>    * @access_type: The type of MMU access
>    * @mode: Indicates current privilege level.
>    */
> -static int get_physical_address_pmp(CPURISCVState *env, int *prot, hwaddr addr,
> -                                    int size, MMUAccessType access_type,
> +static int get_physical_address_pmp(CPURISCVState *env, int *prot,
> +                                    hwaddr first, hwaddr last,
> +                                    MMUAccessType access_type,
>                                       privilege_mode_t mode)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Orthogonal, it would be clearer if get_physical_address_pmp & co
were returning an enum.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.