|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 02/13] xen/arm: allocate secondaries dom0 vcpus
On Wed, 2013-04-24 at 20:07 +0100, Stefano Stabellini wrote:
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ---
> xen/arch/arm/domain_build.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index a6d8e9d..5dfa592 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -363,7 +363,7 @@ static void dtb_load(struct kernel_info *kinfo)
> int construct_dom0(struct domain *d)
> {
> struct kernel_info kinfo = {};
> - int rc;
> + int rc, i, cpu = 0;
I don't think you need to init cpu here.
> struct vcpu *v = d->vcpu[0];
> struct cpu_user_regs *regs = &v->arch.cpu_info->guest_cpu_user_regs;
> @@ -451,6 +451,12 @@ int construct_dom0(struct domain *d)
> }
> #endif
>
> + for ( i = 1; i < d->max_vcpus; i++ )
> + {
> + cpu = cpumask_cycle(cpu, &cpu_online_map);
> + (void)alloc_vcpu(d, i, cpu);
Some sort of print on the first failure would be nice, or to be honest
looking at the sorts of failure modes alloc_vcpu has just bailing on the
whole thing might be best.
> + }
> +
> local_abort_enable();
Aside: I wonder what led this to get put here. It doesn't happen on
non-boot CPUs for one thing!
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |