From: Konrad Rzeszutek Wilk Date: Thu, 1 Sep 2011 13:48:27 +0000 (-0400) Subject: xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead. X-Git-Tag: v2.6.33.20~88 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=657c2a0c9fd3e6945c3c2ab6bcf49e8d9bbf5916;p=karo-tx-linux.git xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead. commit ed467e69f16e6b480e2face7bc5963834d025f91 upstream. We have hit a couple of customer bugs where they would like to use those parameters to run an UP kernel - but both of those options turn of important sources of interrupt information so we end up not being able to boot. The correct way is to pass in 'dom0_max_vcpus=1' on the Xen hypervisor line and the kernel will patch itself to be a UP kernel. Fixes bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637308 Acked-by: Ian Campbell Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index ad5df678335e..6c6e73362327 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -30,6 +30,7 @@ #include #include +#include #include "xen-ops.h" #include "mmu.h" @@ -180,6 +181,15 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus) { unsigned cpu; + if (skip_ioapic_setup) { + char *m = (max_cpus == 0) ? + "The nosmp parameter is incompatible with Xen; " \ + "use Xen dom0_max_vcpus=1 parameter" : + "The noapic parameter is incompatible with Xen"; + + xen_raw_printk(m); + panic(m); + } xen_init_lock_cpu(0); smp_store_cpu_info(0);