[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] Revert 23183:98ba0aceaf30 (xen-unstable:24007:0526644ad2a6).



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1321521007 0
# Node ID 1bbf2940ef6146923593e642b34f7c55d1c58f92
# Parent  51f58b21044755c50f9375068e37f93325bc861d
Revert 23183:98ba0aceaf30 (xen-unstable:24007:0526644ad2a6).

Locking is broken (calls evtchn_unmask with lock already held).

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 51f58b210447 -r 1bbf2940ef61 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Wed Nov 16 16:39:02 2011 +0000
+++ b/xen/arch/x86/physdev.c    Thu Nov 17 09:10:07 2011 +0000
@@ -261,7 +261,6 @@
         ret = -EINVAL;
         if ( eoi.irq >= v->domain->nr_pirqs )
             break;
-        spin_lock(&v->domain->event_lock);
         if ( v->domain->arch.pirq_eoi_map )
             evtchn_unmask(v->domain->pirq_to_evtchn[eoi.irq]);
         if ( !is_hvm_domain(v->domain) ||
@@ -269,19 +268,6 @@
             ret = pirq_guest_eoi(v->domain, eoi.irq);
         else
             ret = 0;
-        if ( is_hvm_domain(v->domain) &&
-                domain_pirq_to_emuirq(v->domain, eoi.irq) > 0 )
-        {
-            struct hvm_irq *hvm_irq = &v->domain->arch.hvm_domain.irq;
-            int gsi = domain_pirq_to_emuirq(v->domain, eoi.irq);
-
-            /* if this is a level irq and count > 0, send another
-             * notification */ 
-            if ( gsi >= NR_ISAIRQS /* ISA irqs are edge triggered */
-                    && hvm_irq->gsi_assert_count[gsi] )
-                send_guest_pirq(v->domain, eoi.irq);
-        }
-        spin_unlock(&v->domain->event_lock);
         break;
     }
 
@@ -337,10 +323,9 @@
             break;
         irq_status_query.flags = 0;
         if ( is_hvm_domain(v->domain) &&
-                domain_pirq_to_irq(v->domain, irq) <= 0 &&
-                domain_pirq_to_emuirq(v->domain, irq) == IRQ_UNBOUND )
+             domain_pirq_to_irq(v->domain, irq) <= 0 )
         {
-            ret = -EINVAL;
+            ret = copy_to_guest(arg, &irq_status_query, 1) ? -EFAULT : 0;
             break;
         }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.