aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/arch/x86/physdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index ca4fb59e97..f280c28c6f 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -219,7 +219,8 @@ int physdev_unmap_pirq(domid_t domid, int pirq)
if ( is_hvm_domain(d) )
{
spin_lock(&d->event_lock);
- ret = unmap_domain_pirq_emuirq(d, pirq);
+ if ( domain_pirq_to_emuirq(d, pirq) != IRQ_UNBOUND )
+ ret = unmap_domain_pirq_emuirq(d, pirq);
spin_unlock(&d->event_lock);
if ( domid == DOMID_SELF || ret )
goto free_domain;