qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edg


From: Eric Auger
Subject: [Qemu-devel] [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS
Date: Wed, 23 Sep 2015 00:00:30 +0100

In irqfd mode, current code attempts to set a resamplefd whatever
the type of the IRQ. For an edge-sensitive IRQ this attempt fails
and as a consequence the whole irqfd setup fails and we fall back
to the slow mode. This patch bypasses the resamplefd setting for
non level-sentive IRQs.

Signed-off-by: Eric Auger <address@hidden>
---
 hw/vfio/platform.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 38eaccf..2c91650 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -352,6 +352,10 @@ static int vfio_set_resample_eventfd(VFIOINTp *intp)
     int argsz, ret;
     int32_t *pfd;
 
+    if (!(intp->flags & VFIO_IRQ_INFO_AUTOMASKED)) {
+        return 0;
+    }
+
     argsz = sizeof(*irq_set) + sizeof(*pfd);
     irq_set = g_malloc0(argsz);
     irq_set->argsz = argsz;
-- 
1.8.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]