]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve virtio needs barriers
authorrgrimes <rgrimes@FreeBSD.org>
Sat, 18 May 2019 19:32:38 +0000 (19:32 +0000)
committerrgrimes <rgrimes@FreeBSD.org>
Sat, 18 May 2019 19:32:38 +0000 (19:32 +0000)
commit05da83f062cfad723cda4b4f78c05b9e470677a4
treeb54fc1e3fde15299074be9cb77c5001eb09b33d8
parent6ddc0bb9bcf7435d1626b14bfdf2adf3ac60e88d
bhyve virtio needs barriers

Under certain tight race conditions, we found that the lack of a memory
barrier in bhyve's virtio handling causes it to miss a NO_NOTIFY state
transition on block devices, resulting in guest stall. The investigation
is recorded in OS-7613. As part of the examination into bhyve's use of
barriers, one other section was found to be problematic, but only on
non-x86 ISAs with less strict memory ordering. That was addressed in
this patch as well, although it was not at all a problem on x86.

PR: 231117
Submitted by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: jhb, kib, rgrimes
Approved by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D19501
usr.sbin/bhyve/virtio.c