>From 74b97a070bdadb4343a63c7f214bcda30a0ab37e Mon Sep 17 00:00:00 2001 From: Markus Armbruster <arm...@redhat.com> 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