[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] linux-user/arm: Implement __kernel_cmpxchg64 with host a
From: |
Peter Maydell |
Subject: |
Re: [PATCH 3/3] linux-user/arm: Implement __kernel_cmpxchg64 with host atomics |
Date: |
Tue, 15 Mar 2022 18:18:42 +0000 |
On Mon, 14 Mar 2022 at 04:46, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> If CONFIG_ATOMIC64, we can use a host cmpxchg and provide
> atomicity across processes; otherwise we have no choice but
> to continue using start/end_exclusive.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> -segv:
> - end_exclusive();
> - /* We get the PC of the entry address - which is as good as anything,
> - on a real kernel what you get depends on which mode it uses. */
This comment about the PC the guest signal handler is going
to see when we take the SEGV is still valid, I think ?
> - /* XXX: check env->error_code */
> - force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR,
> - env->exception.vaddress);
> + segv:
> + force_sig_fault(TARGET_SIGSEGV,
> + page_get_flags(addr) & PAGE_VALID ?
> + TARGET_SEGV_ACCERR : TARGET_SEGV_MAPERR, addr);
> }
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM