xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Sander Eikelenboom <linux@eikelenboom.it>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: Xen-unstable: Xen panic when shutting down HVM guest with PCI passthrough: RIP: e008:[<ffff82d0801099b1>] evtchn_move_pirqs+0x90/0xbf
Date: Fri, 06 Jun 2014 06:43:28 +0200	[thread overview]
Message-ID: <539146F0.7040902@suse.com> (raw)
In-Reply-To: <53909933.5020109@citrix.com>

On 06/05/2014 06:22 PM, Andrew Cooper wrote:
> On 05/06/14 17:03, Sander Eikelenboom wrote:
>> Thursday, June 5, 2014, 5:03:24 PM, you wrote:
>>
>>> On 05/06/14 15:54, Sander Eikelenboom       wrote:
>>>
>>> Hi,
>>> When shutting down a HVM guest with PCI passthrough Xen panics with the panic
>>> below (complete xl-dmesg attached).
>>> # addr2line -e xen-syms ffff82d0801099b1
>>> /usr/src/new/xen-unstable/xen/common/event_channel.c:1326
>>> which is:
>>>          pirq_set_affinity(d, chn->u.pirq.irq, mask);
>>>
>>>
>>>       This is presumably an ordering issue on destroy.
>>>
>>>       Does reverting bac6334b5 fix the problem?
>>>
>>>       ~Andrew
>> Hi Andrew,
>>
>> That seems to have been a good hunch, after reverting that commit i have been
>> able to repeatedly create and shutdown the guest with passthrough, without a crash.
>>
>> --
>> Sander
>>
>
> CC'ing George and Juergen as the authors of the identified patch
>
> c/s bac6334b5 "move domain to cpupool0 before destroying it" appears to
> cause the crash identified the root of this thread.
>
> It appears to now move event channels after having torn parts of the
> event channel infrastructure.

Hmm, does the following patch fix it?


Juergen

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index c174c41..3ea9fc8 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -297,7 +297,8 @@ int sched_move_domain(struct domain *d, struct 
cpupool *c)
          spin_unlock_irq(lock);

          v->sched_priv = vcpu_priv[v->vcpu_id];
-        evtchn_move_pirqs(v);
+        if ( !d->is_dying )
+            evtchn_move_pirqs(v);

          new_p = cpumask_cycle(new_p, c->cpu_valid);

  reply	other threads:[~2014-06-06  4:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 14:54 Xen-unstable: Xen panic when shutting down HVM guest with PCI passthrough: RIP: e008:[<ffff82d0801099b1>] evtchn_move_pirqs+0x90/0xbf Sander Eikelenboom
2014-06-05 15:03 ` Andrew Cooper
2014-06-05 16:03   ` Sander Eikelenboom
2014-06-05 16:22     ` Andrew Cooper
2014-06-06  4:43       ` Jürgen Groß [this message]
2014-06-06  8:15         ` Sander Eikelenboom
2014-06-06  8:35           ` Jan Beulich
2014-06-06  9:44             ` Sander Eikelenboom
2014-06-06 10:03               ` Jan Beulich
2014-06-06 10:14                 ` Sander Eikelenboom
2014-06-06 10:31                   ` Jan Beulich
2014-06-06 10:32         ` Jan Beulich

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=539146F0.7040902@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=linux@eikelenboom.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).