From: Keir Fraser Date: Mon, 29 Nov 2010 17:44:32 +0000 (+0000) Subject: x86: fixes after emuirq changes X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11193 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9e1a3415b773fab5ec57f0f9e972df9881090bfb;p=xen.git x86: fixes after emuirq changes Signed-off-by: Wei Wang --- diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index fa63de2ab0..3dfe4901e9 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1860,7 +1860,8 @@ int unmap_domain_pirq_emuirq(struct domain *d, int pirq) } d->arch.pirq_emuirq[pirq] = IRQ_UNBOUND; - d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND; + if ( emuirq != IRQ_PT ) + d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND; done: return ret; diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index 2913a9c1b7..5e0bbe174b 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -236,7 +236,8 @@ static int physdev_unmap_pirq(struct physdev_unmap_pirq *unmap) spin_lock(&d->event_lock); ret = unmap_domain_pirq_emuirq(d, unmap->pirq); spin_unlock(&d->event_lock); - goto free_domain; + if ( unmap->domid == DOMID_SELF || ret ) + goto free_domain; } ret = -EPERM;