From mboxrd@z Thu Jan 1 00:00:00 1970 From: jgross@suse.com Subject: [PATCH] Avoid crash on HVM domain destroy with PCI passthrough Date: Fri, 6 Jun 2014 12:53:51 +0200 Message-ID: <1402052031-10070-1-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, george.dunlap@eu.citrix.com Cc: Juergen Gross List-Id: xen-devel@lists.xenproject.org From: Juergen Gross c/s bac6334b5 "move domain to cpupool0 before destroying it" introduced a problem when destroying a HVM domain with PCI passthrough enabled. The moving of the domain to cpupool0 includes moving the pirqs to the cpupool0 cpus, but the event channel infrastructure already is unusable for the domain. So just avoid moving pirqs for dying domains. Signed-off-by: Juergen Gross --- xen/common/schedule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 1.8.4.5