svn commit: r338624 - head/sys/x86/x86

Roger Pau Monné royger at FreeBSD.org
Thu Sep 13 07:05:52 UTC 2018


Author: royger
Date: Thu Sep 13 07:05:51 2018
New Revision: 338624
URL: https://svnweb.freebsd.org/changeset/base/338624

Log:
  msi: remove the check that interrupt sources have been added
  
  When running as a specific type of Xen guest the hypervisor won't
  provide any emulated IO-APICs or legacy PICs at all, thus hitting the
  following assert in the MSI code:
  
  panic: Assertion num_io_irqs > 0 failed at /usr/src/sys/x86/x86/msi.c:334
  cpuid = 0
  time = 1
  KDB: stack backtrace:
  db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff826ffa70
  vpanic() at vpanic+0x1a3/frame 0xffffffff826ffad0
  panic() at panic+0x43/frame 0xffffffff826ffb30
  msi_init() at msi_init+0xed/frame 0xffffffff826ffb40
  apic_setup_io() at apic_setup_io+0x72/frame 0xffffffff826ffb50
  mi_startup() at mi_startup+0x118/frame 0xffffffff826ffb70
  start_kernel() at start_kernel+0x10
  
  Fix this by removing the assert in the MSI code, since it's possible
  to get to the MSI initialization without having registered any other
  interrupt sources.
  
  Reviewed by:		jhb
  Approved by:		re (gjb)
  Sponsored by:		Citrix Systems R&D
  Differential revision:	https://reviews.freebsd.org/D17001

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

Modified: head/sys/x86/x86/msi.c
==============================================================================
--- head/sys/x86/x86/msi.c	Thu Sep 13 07:04:00 2018	(r338623)
+++ head/sys/x86/x86/msi.c	Thu Sep 13 07:05:51 2018	(r338624)
@@ -331,7 +331,6 @@ msi_init(void)
 	}
 #endif
 
-	MPASS(num_io_irqs > 0);
 	first_msi_irq = max(MINIMUM_MSI_INT, num_io_irqs);
 	num_io_irqs = first_msi_irq + NUM_MSI_INTS;
 


More information about the svn-src-all mailing list