From 77e3b4f157e3cdacd1a05938fff6478f8da56d35 Mon Sep 17 00:00:00 2001 From: sephe Date: Mon, 29 Feb 2016 04:58:40 +0000 Subject: 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 MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5436 --- sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c b/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c index 8a1e412..4895f71 100644 --- a/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c +++ b/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c @@ -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) { /* -- cgit v1.1