Author: avg
Date: Thu Nov  7 21:14:59 2019
New Revision: 354482
URL: https://svnweb.freebsd.org/changeset/base/354482

Log:
  IPI_TRACE is not really supported on xen
  
  x86 stack_save_td_running() can work safely only if IPI_TRACE is a
  non-maskable interrupt.  But at the moment FreeBSD/Xen does not provide
  support for the NMI delivery mode.  So, mark the functionality as
  unsupported similarly to other platforms without NMI.
  Maybe there is a way to provide a Xen-specific working
  stack_save_td_running(), but I couldn't figure it out.
  
  MFC after:    3 weeks
  Sponsored by: Panzura

Modified:
  head/sys/x86/x86/stack_machdep.c

Modified: head/sys/x86/x86/stack_machdep.c
==============================================================================
--- head/sys/x86/x86/stack_machdep.c    Thu Nov  7 21:08:49 2019        
(r354481)
+++ head/sys/x86/x86/stack_machdep.c    Thu Nov  7 21:14:59 2019        
(r354482)
@@ -135,6 +135,13 @@ int
 stack_save_td_running(struct stack *st, struct thread *td)
 {
 
+#ifdef XENHVM
+       /*
+        * There is no NMI support on Xen, so this code can lead to
+        * an inter-processor deadlock.
+        */
+       return (EOPNOTSUPP);
+#endif /* XENHVM */
 #ifdef STACK
        THREAD_LOCK_ASSERT(td, MA_OWNED);
        MPASS(TD_IS_RUNNING(td));
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to