All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Riku Voipio <riku.voipio@linaro.org>,
	tim@xen.org, Tamas K Lengyel <tklengyel@sec.in.tum.de>,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH] xen/arm: p2m: Restrict preemption check in apply_p2m_changes
Date: Tue, 5 May 2015 16:23:51 +0100	[thread overview]
Message-ID: <1430839431.2660.129.camel@citrix.com> (raw)
In-Reply-To: <1430838129-21693-1-git-send-email-julien.grall@citrix.com>

On Tue, 2015-05-05 at 16:02 +0100, Julien Grall wrote:
> The commit 569fb6c "xen/arm: Data abort exception (R/W) mem_access
> events" makes apply_p2m_changes to call hypercall_preempt_check for any
> operation rather than for relinquish.
> 
> The function hypercall_preempt_check call local_events_need_delivery
> which rely on the current VCPU is not an idle VCPU.
> Although, during DOM0 building the current VCPU is an idle one. This
> would make Xen crash with the following stack trace:
> 
> (XEN) CPU0: Unexpected Trap: Data Abort
> [...]
> (XEN) Xen call trace:
> (XEN)    [<00256ef4>] apply_p2m_changes+0x210/0x1190 (PC)
> (XEN)    [<002506b4>] gic_events_need_delivery+0x5c/0x13c (LR)
> (XEN)    [<002580ec>] map_mmio_regions+0x64/0x74
> (XEN)    [<00251958>] gicv2v_setup+0xf8/0x150
> (XEN)    [<00250964>] gicv_setup+0x20/0x30
> (XEN)    [<0024cb3c>] arch_domain_create+0x170/0x244
> (XEN)    [<00207df0>] domain_create+0x2ac/0x4d8
> (XEN)    [<0028e3d0>] start_xen+0xcbc/0xee4
> (XEN)    [<00200540>] paging+0x94/0xd8
> (XEN)
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) CPU0: Unexpected Trap: Data Abort
> (XEN)
> (XEN) ****************************************
> 
> hypercall_preempt_check is expecting to be call only when the current
> VCPU belong to a real domain (see x86 behavior).
> 
> As the bug prevents Xen booting on some platform, fix it by only check
> preemption when the current VCPU is an idle one for now. We could
> improve it later.
> 
> Reported-by: Riku Voipio <riku.voipio@linaro.org>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
> CC: Tamas K Lengyel <tklengyel@sec.in.tum.de>

Acked + applied, thanks.

  reply	other threads:[~2015-05-05 15:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 15:02 [PATCH] xen/arm: p2m: Restrict preemption check in apply_p2m_changes Julien Grall
2015-05-05 15:23 ` Ian Campbell [this message]
2015-05-05 15:50 ` Konrad Rzeszutek Wilk
2015-05-05 16:31   ` Julien Grall
2015-05-06  8:31     ` Ian Campbell
2015-05-06 10:48       ` Julien Grall

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=1430839431.2660.129.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=riku.voipio@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=tklengyel@sec.in.tum.de \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.