Module Name: src Committed By: riastradh Date: Sat Feb 25 00:34:01 UTC 2023
Modified Files: src/sys/arch/xen/xenbus: xenbus_comms.c Log Message: xenbus_comms.c: Membar audit. This had the sense of membars reversed, presumably because xen_rmb and xen_wmb had gotten reversed at some point. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/xen/xenbus/xenbus_comms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/xen/xenbus/xenbus_comms.c diff -u src/sys/arch/xen/xenbus/xenbus_comms.c:1.24 src/sys/arch/xen/xenbus/xenbus_comms.c:1.25 --- src/sys/arch/xen/xenbus/xenbus_comms.c:1.24 Wed May 13 13:19:38 2020 +++ src/sys/arch/xen/xenbus/xenbus_comms.c Sat Feb 25 00:34:01 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: xenbus_comms.c,v 1.24 2020/05/13 13:19:38 jdolecek Exp $ */ +/* $NetBSD: xenbus_comms.c,v 1.25 2023/02/25 00:34:01 riastradh Exp $ */ /****************************************************************************** * xenbus_comms.c * @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xenbus_comms.c,v 1.24 2020/05/13 13:19:38 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xenbus_comms.c,v 1.25 2023/02/25 00:34:01 riastradh Exp $"); #include <sys/types.h> #include <sys/null.h> @@ -153,9 +153,9 @@ xb_write(const void *data, unsigned len) len -= avail; /* Other side must not see new header until data is there. */ - xen_rmb(); + xen_wmb(); intf->req_prod += avail; - xen_rmb(); + xen_wmb(); hypervisor_notify_via_evtchn(xen_start_info.store_evtchn); } @@ -202,9 +202,9 @@ xb_read(void *data, unsigned len) len -= avail; /* Other side must not see free space until we've copied out */ - xen_rmb(); + xen_wmb(); intf->rsp_cons += avail; - xen_rmb(); + xen_wmb(); XENPRINTF(("Finished read of %i bytes (%i to go)\n", avail, len));