mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sander Eikelenboom <linux@eikelenboom.it>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: david.vrabel@citrix.com, jgross@suse.com,
	xen-devel@lists.xen.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier
Date: Mon, 03 Oct 2016 10:43:12 +0200	[thread overview]
Message-ID: <b1853d5ded7562336c45db69e2eb7827@eikelenboom.it> (raw)
In-Reply-To: <1475448319-21939-1-git-send-email-boris.ostrovsky@oracle.com>

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 <boris.ostrovsky@oracle.com>
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> ---
> 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;

  reply	other threads:[~2016-10-03  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 22:45 Boris Ostrovsky
2016-10-03  8:43 ` Sander Eikelenboom [this message]
2016-10-05  9:44 ` [Xen-devel] " David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1853d5ded7562336c45db69e2eb7827@eikelenboom.it \
    --to=linux@eikelenboom.it \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®