CTSRD-CHERI / qemu

QEMU with support for CHERI
Other
52 stars 28 forks source link

tcg: Do not elide memory barriers for !CF_PARALLEL in system mode #236

Closed jrtc27 closed 1 year ago

jrtc27 commented 1 year ago

The virtio devices require proper memory ordering between the vcpus and the iothreads.

Reviewed-by: Philippe Mathieu-Daudé philmd@linaro.org Signed-off-by: Richard Henderson richard.henderson@linaro.org

(cherry picked from commit c914d46d0a645e7c633292146f4e38c945d4f847)

arichardson commented 1 year ago

Is this the cause of the timeouts after virtio_random being initialized by cheribsd?

arichardson commented 1 year ago

FYI I'm planning to update the 6.0 merge PR soon, not sure if that includes this fix.

jrtc27 commented 1 year ago

Is this the cause of the timeouts after virtio_random being initialized by cheribsd?

Can't say, but that did make me think of this as a possibility. On my weaker memory model arm64 MacBook it manifested years ago as vtnet queue inconsistencies that caused assertion failures. Don't know how it shows up on x86. Perhaps it doesn't due to sequential consistency. Regardless, it's definitely wrong as it is today.

FYI I'm planning to update the 6.0 merge PR soon, not sure if that includes this fix.

v8.1.0-rc0 is the first tag it shows up in for GitLab, https://patchwork.kernel.org/project/qemu-devel/cover/20230619142333.429028-1-richard.henderson@linaro.org/ is the finalised patch series