On Tue, Aug 30, 2011 at 09:04:30AM +0100, Ian Campbell wrote: > 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?
Yes. > > > 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"); > > + It might make sense to also use 'xen_raw_printk' as sometimes you don't get to see the panic - you end up with this unhelpfull message: (XEN) domain_crash_sync called from entry.S (XEN) Domain 0 (vcpu#0) crashed on cpu#0: .. snip.. so something like this: diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index b4533a8..8424dd4 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -32,6 +32,7 @@ #include <xen/page.h> #include <xen/events.h> +#include <xen/hvc-console.h> #include "xen-ops.h" #include "mmu.h" @@ -207,6 +208,15 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus) unsigned cpu; unsigned int i; + 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); -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110830142232.gh11...@dumpdata.com