NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/57199: Pure PVH i386 guests hang on disk activity
On Mon, Jul 15, 2024 at 01:25:31PM +0200, Manuel Bouyer wrote:
> I can reproduce a hang of the network interface, which may have the same
> cause. Looks like an event is missed by the backend.
>
> What is your dom0 ?
Can you try the attached patch on your guest ?
With this my network hang is gone, and I can run your tar test to
completion
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Index: include/hypervisor.h
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/include/hypervisor.h,v
retrieving revision 1.55.4.3
diff -u -p -u -r1.55.4.3 hypervisor.h
--- include/hypervisor.h 18 Oct 2023 16:53:03 -0000 1.55.4.3
+++ include/hypervisor.h 15 Jul 2024 16:08:09 -0000
@@ -108,13 +108,15 @@ struct xen_npx_attach_args {
* The proper fix is to get upstream to stop assuming that all OSs use
* mb(), rmb(), wmb().
*/
+
#undef xen_mb
#undef xen_rmb
#undef xen_wmb
-#define xen_mb() membar_sync()
-#define xen_rmb() membar_acquire()
-#define xen_wmb() membar_release()
+#define xen_mb() membar_sync(); asm volatile("mfence":::"memory");
+#define xen_rmb() membar_acquire(); asm volatile("lfence":::"memory");
+#define xen_wmb() membar_release(); asm volatile("sfence" ::: "memory");
+
#endif /* __XEN_INTERFACE_VERSION */
#include <machine/xen/hypercalls.h>
Index: include/xenring.h
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/include/xenring.h,v
retrieving revision 1.6.20.1
diff -u -p -u -r1.6.20.1 xenring.h
--- include/xenring.h 31 Jul 2023 15:23:02 -0000 1.6.20.1
+++ include/xenring.h 15 Jul 2024 16:08:09 -0000
@@ -24,9 +24,9 @@
#undef xen_rmb
#undef xen_wmb
-#define xen_mb() membar_sync()
-#define xen_rmb() membar_acquire()
-#define xen_wmb() membar_release()
+#define xen_mb() membar_sync(); asm volatile("mfence":::"memory");
+#define xen_rmb() membar_acquire(); asm volatile("lfence":::"memory");
+#define xen_wmb() membar_release(); asm volatile("sfence" ::: "memory");
/*
* Define ring types. These were previously part of the public API.
Home |
Main Index |
Thread Index |
Old Index