qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 36/40] ivshmem: Split ivshmem-plain, ivshmem-


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3 36/40] ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem
Date: Mon, 21 Mar 2016 13:32:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

>From 74b97a070bdadb4343a63c7f214bcda30a0ab37e Mon Sep 17 00:00:00 2001
From: Markus Armbruster <address@hidden>
Date: Mon, 21 Mar 2016 13:12:10 +0100
Subject: [PATCH] fixup! ivshmem: Split ivshmem-plain, ivshmem-doorbell off
 ivshmem

ivshmem_update_irq() must not touch INTx when the device doesn't use
it.  The obvious guard would be the Interrupt Pin register in PCI
config space.  However, since device ivshmem sets it even when it
doesn't have INTx, we check property "msi" instead.  For the new
ivshmem-plain, we do need to check config space.
---
 hw/misc/ivshmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 18f6802..32ca70f 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -146,7 +146,8 @@ static void ivshmem_update_irq(IVShmemState *s)
     uint32_t isr = s->intrstatus & s->intrmask;
 
     /* No INTx with msi=on, whether the guest enabled MSI-X or not */
-    if (ivshmem_has_feature(s, IVSHMEM_MSI)) {
+    if (ivshmem_has_feature(s, IVSHMEM_MSI)
+        || !d->config[PCI_INTERRUPT_PIN]) {
         return;
     }
 
-- 
2.4.3




reply via email to

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