From: WX Chen <wxchen0913@gmail.com>
To: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
qemu-devel@nongnu.org
Cc: Tao Tang <tangtao1634@phytium.com.cn>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Weiwei Li <liwei1518@gmail.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
Chao Liu <chao.liu@processmission.com>,
qemu-riscv@nongnu.org
Subject: Re: [PATCH] target/riscv: add memory ordering required by RVTSO in ldst_stride_trans
Date: Wed, 25 Nov 2026 10:18:47 +0800 [thread overview]
Message-ID: <fc1987c8-33f4-4641-8473-955e63e491cc@gmail.com> (raw)
In-Reply-To: <77ad37e6-f068-4230-9cf2-9b8364fa7c49@oss.qualcomm.com>
Hi Daniel,
Thanks for the comment!
On 11/25/26 02:52, Daniel Henrique Barboza wrote:
> Any reason to not handle ldst_index_trans, ldff_trans and
> ldst_whole_trans? They all
> fall into the same RVTSO work you're doing here.
No technical reason, just not sure if they should be organized as a
patch series :D
I'll include those paths in the v2 series.
> In ldst_us_trans() we have a Ztso comment explaining why we're
> positioning the barriers
> around the loop. We don't need to replicate it here but it would be
> helpful if we
> could add a comment like:
>
> /*
> * See ztso comment in ldst_us_trans for more info on why
> * the barriers are put around the loop.
> */
>
> In the helpers we ended up adding these Ztso related barriers.
>
Indeed. I'll add them in v2.
Thanks,
Chen
>
> Thanks,
> Daniel
>
>> + if (is_store && s->ztso) {
>> + tcg_gen_mb(TCG_MO_LD_ST | TCG_MO_ST_ST | TCG_BAR_STRL);
>> + }
>> +
>> mark_vs_dirty(s);
>> fn(dest, mask, base, stride, tcg_env, desc);
>> + if (!is_store && s->ztso) {
>> + tcg_gen_mb(TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_BAR_LDAQ);
>> + }
>> +
>> finalize_rvv_inst(s);
>> return true;
>> }
>> @@ -924,7 +932,7 @@ static bool ld_stride_op(DisasContext *s,
>> arg_rnfvm *a, uint8_t eew)
>> data = FIELD_DP32(data, VDATA, NF, a->nf);
>> data = FIELD_DP32(data, VDATA, VTA, s->vta);
>> data = FIELD_DP32(data, VDATA, VMA, s->vma);
>> - return ldst_stride_trans(a->rd, a->rs1, a->rs2, data, fn, s);
>> + return ldst_stride_trans(a->rd, a->rs1, a->rs2, data, fn, s,
>> false);
>> }
>> static bool ld_stride_check(DisasContext *s, arg_rnfvm* a,
>> uint8_t eew)
>> @@ -958,7 +966,7 @@ static bool st_stride_op(DisasContext *s,
>> arg_rnfvm *a, uint8_t eew)
>> return false;
>> }
>> - return ldst_stride_trans(a->rd, a->rs1, a->rs2, data, fn, s);
>> + return ldst_stride_trans(a->rd, a->rs1, a->rs2, data, fn, s, true);
>> }
>> static bool st_stride_check(DisasContext *s, arg_rnfvm* a,
>> uint8_t eew)
>>
>> ---
>> base-commit: 08ed97c33c3818ef51a7c852347a28e9f66807b5
>> change-id: 20261121-fix-rvtso-vector-stride-39fd6f035f17
>>
>> Best regards,
>
prev parent reply other threads:[~2026-11-25 2:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 9:00 [PATCH] target/riscv: add memory ordering required by RVTSO in ldst_stride_trans WX Chen
2026-11-24 18:52 ` Daniel Henrique Barboza
2026-11-25 2:18 ` WX Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc1987c8-33f4-4641-8473-955e63e491cc@gmail.com \
--to=wxchen0913@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=chao.liu@processmission.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=tangtao1634@phytium.com.cn \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.