From: David Woodhouse <d...@amazon.co.uk>

Signed-off-by: David Woodhouse <d...@amazon.co.uk>
---
 hw/i386/kvm/xen_evtchn.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c
index 18c88229ab..c4103ee98b 100644
--- a/hw/i386/kvm/xen_evtchn.c
+++ b/hw/i386/kvm/xen_evtchn.c
@@ -1436,6 +1436,14 @@ bool xen_evtchn_set_gsi(int gsi, int level)
         return false;
     }
 
+    /*
+     * XXX: We access this without locking. Because we'd deadlock
+     * if it was the callback_gsi. Do something cleverer.
+     */
+    if (gsi && gsi == s->callback_gsi) {
+        return false;
+    }
+
     QEMU_LOCK_GUARD(&s->port_lock);
 
     pirq = s->gsi_pirq[gsi];
-- 
2.35.3


Reply via email to