]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC: r347960: bhyve virtio needs barriers
authorrgrimes <rgrimes@FreeBSD.org>
Thu, 23 May 2019 18:58:06 +0000 (18:58 +0000)
committerrgrimes <rgrimes@FreeBSD.org>
Thu, 23 May 2019 18:58:06 +0000 (18:58 +0000)
commitc330bbff018d58150a25ed39512d350fe2fa1df8
tree24c6c7752a0c795eaf37b39d32e111220b0e6119
parent75775149a8618ec44dca25335be3fdc851f1a03e
MFC: r347960: 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: re (gjb), jhb
Differential Revision: https://reviews.freebsd.org/D19501
usr.sbin/bhyve/virtio.c