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
The following reply was made to PR kern/57199; it has been noted by GNATS.
From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: Brad Spencer <brad%anduin.eldar.org@localhost>
Cc: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, gdt%lexort.com@localhost
Subject: Re: kern/57199: Pure PVH i386 guests hang on disk activity
Date: Mon, 15 Jul 2024 18:36:41 +0200
--C4fsJCkvRmqOXAf5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
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
--
--C4fsJCkvRmqOXAf5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
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.
--C4fsJCkvRmqOXAf5--
Home |
Main Index |
Thread Index |
Old Index