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

Re: [Xen-devel] [RFC PATCH] dpci: Put the dpci back on the list if running on another CPU.



Tuesday, March 17, 2015, 9:18:32 AM, you wrote:

>>>> On 16.03.15 at 18:59, <konrad.wilk@xxxxxxxxxx> wrote:
>> Hence was wondering if it would just be easier to put
>> this patch in (see above) - with the benfit that folks have
>> an faster interrupt passthrough experience and then I work on another
>> variant of this with tristate cmpxchg and ->mapping atomic counter.

> Considering how long this issue has been pending I think we really
> need to get _something_ in (or revert); if this something is the
> patch in its most recent form, so be it (even if maybe not the
> simplest of all possible variants). So please submit as a proper non-
> RFC patch.

> Jan

I'm still running with this first simple stopgap patch from Konrad,
and it has worked fine for me since.

I will see if this new one also "works-for-me", somewhere today :-)

--
Sander



diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index ae050df..d1421b0 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -804,7 +804,18 @@ static void dpci_softirq(void)
         d = pirq_dpci->dom;
         smp_mb(); /* 'd' MUST be saved before we set/clear the bits. */
         if ( test_and_set_bit(STATE_RUN, &pirq_dpci->state) )
-            BUG();
+        {
+            unsigned long flags;
+
+            /* Put back on the list and retry. */
+            local_irq_save(flags);
+            list_add_tail(&pirq_dpci->softirq_list, &this_cpu(dpci_list));
+            local_irq_restore(flags);
+
+            raise_softirq(HVM_DPCI_SOFTIRQ);
+            continue;
+        }
+
         /*
          * The one who clears STATE_SCHED MUST refcount the domain.
          */


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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