* mttcg: warning to user about memory ordering
@ 2023-02-22 16:28 Pierrick Bouvier
2023-02-22 19:14 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Pierrick Bouvier @ 2023-02-22 16:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, bobby.prani
Hello,
When using multi thread tcg, a warning is emitted to user if models for
guest and host are not compatible (like qemu-system-x86_64 running on
aarch64 host)
accel/tcg/tcg-all.c:
161 if (!check_tcg_memory_orders_compatible()) {
162 warn_report("Guest expects a stronger memory ordering "
163 "than the host provides");
164 error_printf("This may cause strange/hard to debug
errors\n");
165 }
However, in tcg/tcg-op.c, all load/stores are emitting memory barriers
using tcg_gen_req_mo, which lets think it's already implemented for any
host/guest combination (was added in b32dc3).
In your opinion, are there still corner cases that are not covered
correctly? If no, should we drop this scary warning?
Regards,
Pierrick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mttcg: warning to user about memory ordering
2023-02-22 16:28 mttcg: warning to user about memory ordering Pierrick Bouvier
@ 2023-02-22 19:14 ` Richard Henderson
2023-02-23 9:52 ` Pierrick Bouvier
0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2023-02-22 19:14 UTC (permalink / raw)
To: Pierrick Bouvier, qemu-devel; +Cc: bobby.prani
On 2/22/23 06:28, Pierrick Bouvier wrote:
> Hello,
>
> When using multi thread tcg, a warning is emitted to user if models for guest and host are
> not compatible (like qemu-system-x86_64 running on aarch64 host)
>
> accel/tcg/tcg-all.c:
> 161 if (!check_tcg_memory_orders_compatible()) {
> 162 warn_report("Guest expects a stronger memory ordering "
> 163 "than the host provides");
> 164 error_printf("This may cause strange/hard to debug errors\n");
> 165 }
>
> However, in tcg/tcg-op.c, all load/stores are emitting memory barriers using
> tcg_gen_req_mo, which lets think it's already implemented for any host/guest combination
> (was added in b32dc3).
>
> In your opinion, are there still corner cases that are not covered correctly? If no,
> should we drop this scary warning?
See
https://lore.kernel.org/qemu-devel/20210316220735.2048137-1-richard.henderson@linaro.org/
https://gitlab.com/rth7680/qemu/-/commits/tcg-mb-small/
It never got merged because it didn't actually solve the s390x on aarch64 problem. I
assume there's something I've missed.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mttcg: warning to user about memory ordering
2023-02-22 19:14 ` Richard Henderson
@ 2023-02-23 9:52 ` Pierrick Bouvier
0 siblings, 0 replies; 3+ messages in thread
From: Pierrick Bouvier @ 2023-02-23 9:52 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: bobby.prani
On 2/22/23 20:14, Richard Henderson wrote:
> On 2/22/23 06:28, Pierrick Bouvier wrote:
>> Hello,
>>
>> When using multi thread tcg, a warning is emitted to user if models for guest and host are
>> not compatible (like qemu-system-x86_64 running on aarch64 host)
>>
>> accel/tcg/tcg-all.c:
>> 161 if (!check_tcg_memory_orders_compatible()) {
>> 162 warn_report("Guest expects a stronger memory ordering "
>> 163 "than the host provides");
>> 164 error_printf("This may cause strange/hard to debug errors\n");
>> 165 }
>>
>> However, in tcg/tcg-op.c, all load/stores are emitting memory barriers using
>> tcg_gen_req_mo, which lets think it's already implemented for any host/guest combination
>> (was added in b32dc3).
>>
>> In your opinion, are there still corner cases that are not covered correctly? If no,
>> should we drop this scary warning?
>
> See
>
> https://lore.kernel.org/qemu-devel/20210316220735.2048137-1-richard.henderson@linaro.org/
> https://gitlab.com/rth7680/qemu/-/commits/tcg-mb-small/
>
> It never got merged because it didn't actually solve the s390x on aarch64 problem. I
> assume there's something I've missed.
>
Thanks for the pointers.
>
> r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-23 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22 16:28 mttcg: warning to user about memory ordering Pierrick Bouvier
2023-02-22 19:14 ` Richard Henderson
2023-02-23 9:52 ` Pierrick Bouvier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).