[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#637308: xen-linux-system-2.6.32-5-xen-amd64: with kernel option 'nosmp', dom0 hangup while init PCI-Express Fusion-MPT SAS



On Mon, 2011-08-29 at 12:55 +0100, Ben Hutchings wrote:
> On Mon, 2011-08-29 at 10:07 +0400, Константин Алексеев wrote:
> > I think this bug may be closed.
> > I posted it to xen devel list and get answer:
> > "It's really an unsupported configuration. If you want to limit dom0 vcpus
> > then dom0_max_vcpus= on Xen command line is the correct way."
> > 
> > http://lists.xensource.com/archives/html/xen-devel/2011-08/msg00665.html
> 
> Maybe we should panic in this case?

It's a bit sad but yes I think that would be better than leaving traps
for the unwary given that the issue is unlikely to bubble up most Xen
developers' todo list any time soon

Your use of skip_ioapic_setup clued me into the probable difference
between nosmp and dom0_max_vcpus=1 -- the disabling of IOAPIC most
likely matters to Xen. Konrad does that sound right? 

>   Something like this (untested):

Looks plausible to me.

> 
> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index e79dbb9..2671b96 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -21,6 +21,7 @@
>  #include <asm/desc.h>
>  #include <asm/pgtable.h>
>  #include <asm/cpu.h>
> +#include <asm/io_apic.h>
>  
>  #include <xen/interface/xen.h>
>  #include <xen/interface/vcpu.h>
> @@ -207,6 +208,12 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
>  	unsigned cpu;
>  	unsigned int i;
>  
> +	if (skip_ioapic_setup)
> +		panic((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_init_lock_cpu(0);
>  
>  	smp_store_cpu_info(0);
> --- END ---
> 
> Ben.
> 

-- 
Ian Campbell
Current Noise: Primordial - No Nation On This Earth

Iowa State -- the high school after high school!
		-- Crow T. Robot




Reply to: