Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-27 Thread Andi Kleen
On Friday 27 April 2007 08:46:19 Jeremy Fitzhardinge wrote: > Andi Kleen wrote: > >> +/* VCPUs are single-cored, and have no siblings */ > >> +static void set_cpu_sibling_map(int cpu) > >> > > > > Can you put this somewhere generic and use it everywhere? Don't want > > duplication of this

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-27 Thread Jeremy Fitzhardinge
Andi Kleen wrote: >> +/* VCPUs are single-cored, and have no siblings */ >> +static void set_cpu_sibling_map(int cpu) >> > > Can you put this somewhere generic and use it everywhere? Don't want > duplication of this code. > Are there any other users? This is a very cutdown version of the

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-27 Thread Jeremy Fitzhardinge
Andi Kleen wrote: +/* VCPUs are single-cored, and have no siblings */ +static void set_cpu_sibling_map(int cpu) Can you put this somewhere generic and use it everywhere? Don't want duplication of this code. Are there any other users? This is a very cutdown version of the code in

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-27 Thread Andi Kleen
On Friday 27 April 2007 08:46:19 Jeremy Fitzhardinge wrote: Andi Kleen wrote: +/* VCPUs are single-cored, and have no siblings */ +static void set_cpu_sibling_map(int cpu) Can you put this somewhere generic and use it everywhere? Don't want duplication of this code. Are

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-25 Thread Jeremy Fitzhardinge
Andi Kleen wrote: > >> #ifdef CONFIG_X86_LOCAL_APIC >> static unsigned long xen_apic_read(unsigned long reg) >> > > Can't you just make them all NULL? Crashing here should be correct. > No. The APIC setup code does at least one unconditional read to get the APIC version before

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-25 Thread Andi Kleen
> #ifdef CONFIG_X86_LOCAL_APIC > static unsigned long xen_apic_read(unsigned long reg) Can't you just make them all NULL? Crashing here should be correct. > +#ifdef CONFIG_SMP > +static const struct smp_ops xen_smp_ops __initdata = { Why __initdata? > +/* VCPUs are single-cored, and

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-25 Thread Andi Kleen
#ifdef CONFIG_X86_LOCAL_APIC static unsigned long xen_apic_read(unsigned long reg) Can't you just make them all NULL? Crashing here should be correct. +#ifdef CONFIG_SMP +static const struct smp_ops xen_smp_ops __initdata = { Why __initdata? +/* VCPUs are single-cored, and have

Re: [PATCH 11/25] xen: Xen SMP guest support

2007-04-25 Thread Jeremy Fitzhardinge
Andi Kleen wrote: #ifdef CONFIG_X86_LOCAL_APIC static unsigned long xen_apic_read(unsigned long reg) Can't you just make them all NULL? Crashing here should be correct. No. The APIC setup code does at least one unconditional read to get the APIC version before deciding the

[PATCH 11/25] xen: Xen SMP guest support

2007-04-23 Thread Jeremy Fitzhardinge
This is a fairly straightforward Xen implementation of smp_ops. One thing this must to is carefully set up all the various sibling and core maps so that the smp scheduler setup works properly (the setup is very simple, since vcpus don't have any siblings or multiple cores). Xen has its own IPI

[PATCH 11/25] xen: Xen SMP guest support

2007-04-23 Thread Jeremy Fitzhardinge
This is a fairly straightforward Xen implementation of smp_ops. One thing this must to is carefully set up all the various sibling and core maps so that the smp scheduler setup works properly (the setup is very simple, since vcpus don't have any siblings or multiple cores). Xen has its own IPI