From: WX Chen <wxchen0913@gmail.com>
To: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
qemu-devel@nongnu.org
Cc: 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, Tao Tang <tangtao1634@phytium.com.cn>
Subject: Re: [PATCH] Provide weaker memory ordering for RISC-V guest FENCE instructions.
Date: Wed, 25 Nov 2026 09:45:09 +0800 [thread overview]
Message-ID: <afc4d908-cf75-447a-a551-4de1205d4aed@gmail.com> (raw)
In-Reply-To: <098d1da6-b17d-40f3-9917-eace9774c216@oss.qualcomm.com>
Hi Daniel,
Thanks for the comment!
> We add the submodule we're changing in it. For this patch it could be:
>
> "target/riscv: weaker memory ordering for guest FENCE instructions"
Yes I missed it, will do it on v2.
> For our current code style, unless we're in a ifcond branch or switch,
> var declarations
> are always in the beginning of functions.
Got it. Will fix it on v2.
Thanks,
Chen
>
> Thanks,
> Daniel
>
>> + if ((a->pred & 0xa) && (a->succ & 0xa)) {
>> + ordering |= TCG_MO_LD_LD;
>> + }
>> + if ((a->pred & 0xa) && (a->succ & 0x5)) {
>> + ordering |= TCG_MO_LD_ST;
>> + }
>> + if ((a->pred & 0x5) && (a->succ & 0xa)) {
>> + ordering |= TCG_MO_ST_LD;
>> + }
>> + if ((a->pred & 0x5) && (a->succ & 0x5)) {
>> + ordering |= TCG_MO_ST_ST;
>> + }
>> + if (ordering) {
>> + tcg_gen_mb(ordering | TCG_BAR_SC);
>> + }
>> return true;
>> }
>>
>> ---
>> base-commit: 08ed97c33c3818ef51a7c852347a28e9f66807b5
>> change-id: 20261120-fix-riscv-fence-20261119-10a425b78673
>>
>> Best regards,
>
next prev parent reply other threads:[~2026-11-25 1:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 9:34 [PATCH] Provide weaker memory ordering for RISC-V guest FENCE instructions WX Chen
2026-11-24 18:42 ` Daniel Henrique Barboza
2026-11-25 1:45 ` WX Chen [this message]
2026-11-25 1:52 ` Chao Liu
2026-11-25 2:26 ` WX Chen
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=afc4d908-cf75-447a-a551-4de1205d4aed@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.