qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] target/riscv: Fix page_check_range use in fault-only-first


From: Alistair Francis
Subject: Re: [PATCH] target/riscv: Fix page_check_range use in fault-only-first
Date: Wed, 2 Aug 2023 09:30:49 -0400

On Fri, Jul 28, 2023 at 11:34 PM LIU Zhiwei
<zhiwei_liu@linux.alibaba.com> wrote:
>
> Commit bef6f008b98(accel/tcg: Return bool from page_check_range) converts
> integer return value to bool type. However, it wrongly converted the use
> of the API in riscv fault-only-first, where page_check_range < = 0, should
> be converted to !page_check_range.
>
> Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  target/riscv/vector_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
> index 4d06754826..a059ef3900 100644
> --- a/target/riscv/vector_helper.c
> +++ b/target/riscv/vector_helper.c
> @@ -583,7 +583,7 @@ vext_ldff(void *vd, void *v0, target_ulong base,
>                                           cpu_mmu_index(env, false));
>                  if (host) {
>  #ifdef CONFIG_USER_ONLY
> -                    if (page_check_range(addr, offset, PAGE_READ)) {
> +                    if (!page_check_range(addr, offset, PAGE_READ)) {
>                          vl = i;
>                          goto ProbeSuccess;
>                      }
> --
> 2.17.1
>
>



reply via email to

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