Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752423AbcJCImS (ORCPT ); Mon, 3 Oct 2016 04:42:18 -0400 Received: from server.eikelenboom.it ([91.121.65.215]:54274 "EHLO server.eikelenboom.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752289AbcJCImO (ORCPT ); Mon, 3 Oct 2016 04:42:14 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 03 Oct 2016 10:43:12 +0200 From: Sander Eikelenboom To: Boris Ostrovsky Cc: david.vrabel@citrix.com, jgross@suse.com, xen-devel@lists.xen.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen/x86: Initialize =?UTF-8?Q?per=5Fcpu=28xen=5Fvcpu?= =?UTF-8?Q?=2C=20=30=29=20a=20little=20earlier?= In-Reply-To: <1475448319-21939-1-git-send-email-boris.ostrovsky@oracle.com> References: <1475448319-21939-1-git-send-email-boris.ostrovsky@oracle.com> Message-ID: User-Agent: Roundcube Webmail/0.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1335 Lines: 44 On 2016-10-03 00:45, Boris Ostrovsky wrote: > xen_cpuhp_setup() calls mutex_lock() which, when CONFIG_DEBUG_MUTEXES > is defined, ends up calling xen_save_fl(). That routine expects > per_cpu(xen_vcpu, 0) to be already initialized. > > Signed-off-by: Boris Ostrovsky > Reported-by: Sander Eikelenboom > --- > Sander, please see if this fixes the problem. Thanks. Hi Boris, I have tested it and it fixes the dom0 crash in early boot for me. Thanks again for investigating and the swift fix ! -- Sander > arch/x86/xen/enlighten.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index 366b6ae..96c2dea 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1644,7 +1644,6 @@ asmlinkage __visible void __init > xen_start_kernel(void) > xen_initial_gdt = &per_cpu(gdt_page, 0); > > xen_smp_init(); > - WARN_ON(xen_cpuhp_setup()); > > #ifdef CONFIG_ACPI_NUMA > /* > @@ -1658,6 +1657,8 @@ asmlinkage __visible void __init > xen_start_kernel(void) > possible map and a non-dummy shared_info. */ > per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; > > + WARN_ON(xen_cpuhp_setup()); > + > local_irq_disable(); > early_boot_irqs_disabled = true;