hyperv: Use proper fence function to keep store-load order for msgs

sfence only makes sure about the store-store order, which is not
sufficient here.  Use atomic_thread_fence_seq_cst() as suggested
jhb and kib (a locked op in the nutshell, which should have the

Reviewed by:	jhb, kib, Jun Su <junsu microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5436
This commit is contained in:
Sepherosa Ziehau 2016-02-29 04:58:40 +00:00
parent f487b23214
commit 5fa2e9dd39

View File

@ -117,7 +117,7 @@ handled:
* not deliver any more messages
* since there is no empty slot
*/
wmb();
atomic_thread_fence_seq_cst();
if (msg->header.message_flags.u.message_pending) {
/*
@ -187,7 +187,7 @@ hv_vmbus_isr(struct trapframe *frame)
* not deliver any more messages
* since there is no empty slot
*/
wmb();
atomic_thread_fence_seq_cst();
if (msg->header.message_flags.u.message_pending) {
/*