|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XENBUS PATCH 1/2] Reduce the strength of Xen barriers on x86
x86 is TSO and only needs a compiler barrier as read/write barriers. Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx> --- include/xen-types.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/xen-types.h b/include/xen-types.h index e4c19a4..3446ac7 100644 --- a/include/xen-types.h +++ b/include/xen-types.h @@ -47,4 +47,13 @@ typedef USHORT uint16_t; typedef ULONG uint32_t; typedef ULONG64 uint64_t; +#define xen_mb() KeMemoryBarrier() +#if defined(_M_IX86) || defined(_M_X64) +#define xen_wmb() KeMemoryBarrierWithoutFence() +#define xen_rmb() KeMemoryBarrierWithoutFence() +#else +#define xen_wmb() KeMemoryBarrier() +#define xen_rmb() KeMemoryBarrier() +#endif + #endif // _XEN_TYPES_H -- 2.54.0.windows.1 -- Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |