[PATCH] accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN

Richard Henderson posted 1 patch 10 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230619132548.400875-1-richard.henderson@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/cputlb.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN
Posted by Richard Henderson 10 months, 3 weeks ago
Otherwise we hit the default assert not reached.
Handle it as MO_ATOM_NONE, because of size and misalignment.
We already handle this correctly in do_ld16_beN.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---

Fixes an abort booting debian11 with -cpu max.

r~

---
 accel/tcg/cputlb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 5e2ca47243..14ce97c33b 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -2727,6 +2727,7 @@ static uint64_t do_st16_leN(CPUArchState *env, MMULookupPageData *p,
          * and so neither is atomic.
          */
     case MO_ATOM_IFALIGN:
+    case MO_ATOM_WITHIN16:
     case MO_ATOM_NONE:
         stq_le_p(p->haddr, int128_getlo(val_le));
         return store_bytes_leN(p->haddr + 8, p->size - 8,
-- 
2.34.1
Re: [PATCH] accel/tcg: Handle MO_ATOM_WITHIN16 in do_st16_leN
Posted by Peter Maydell 10 months, 3 weeks ago
On Mon, 19 Jun 2023 at 14:26, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Otherwise we hit the default assert not reached.
> Handle it as MO_ATOM_NONE, because of size and misalignment.
> We already handle this correctly in do_ld16_beN.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>
> Fixes an abort booting debian11 with -cpu max.
>
> r~
>
> ---
>  accel/tcg/cputlb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index 5e2ca47243..14ce97c33b 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -2727,6 +2727,7 @@ static uint64_t do_st16_leN(CPUArchState *env, MMULookupPageData *p,
>           * and so neither is atomic.
>           */
>      case MO_ATOM_IFALIGN:
> +    case MO_ATOM_WITHIN16:
>      case MO_ATOM_NONE:
>          stq_le_p(p->haddr, int128_getlo(val_le));
>          return store_bytes_leN(p->haddr + 8, p->size - 8,
> --

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM