From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>
Subject: [PULL 07/10] hw/misc/ivshmem: Bury dead legacy INTx code
Date: Thu, 12 Dec 2019 19:54:21 +0100 [thread overview]
Message-ID: <20191212185424.4675-8-thuth@redhat.com> (raw)
In-Reply-To: <20191212185424.4675-1-thuth@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
Devices "ivshmem-plain" and "ivshmem-doorbell" support only MSI-X.
Config space register Interrupt Pin is zero. Device "ivshmem"
additionally supported legacy INTx, but it was removed in commit
5a0e75f0a9 "hw/misc/ivshmem: Remove deprecated "ivshmem" legacy
device". The commit left ivshmem_update_irq() behind. Since the
Interrupt Pin register is zero, the function does nothing. Remove it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20191205203557.11254-1-armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/misc/ivshmem.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 5e3b05eae0..710cdb7263 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -136,44 +136,11 @@ static inline bool ivshmem_is_master(IVShmemState *s)
return s->master == ON_OFF_AUTO_ON;
}
-static void ivshmem_update_irq(IVShmemState *s)
-{
- PCIDevice *d = PCI_DEVICE(s);
- uint32_t isr = s->intrstatus & s->intrmask;
-
- /*
- * Do nothing unless the device actually uses INTx. Here's how
- * the device variants signal interrupts, what they put in PCI
- * config space:
- * Device variant Interrupt Interrupt Pin MSI-X cap.
- * ivshmem-plain none 0 no
- * ivshmem-doorbell MSI-X 1 yes(1)
- * ivshmem,msi=off INTx 1 no
- * ivshmem,msi=on MSI-X 1(2) yes(1)
- * (1) if guest enabled MSI-X
- * (2) the device lies
- * Leads to the condition for doing nothing:
- */
- if (ivshmem_has_feature(s, IVSHMEM_MSI)
- || !d->config[PCI_INTERRUPT_PIN]) {
- return;
- }
-
- /* don't print ISR resets */
- if (isr) {
- IVSHMEM_DPRINTF("Set IRQ to %d (%04x %04x)\n",
- isr ? 1 : 0, s->intrstatus, s->intrmask);
- }
-
- pci_set_irq(d, isr != 0);
-}
-
static void ivshmem_IntrMask_write(IVShmemState *s, uint32_t val)
{
IVSHMEM_DPRINTF("IntrMask write(w) val = 0x%04x\n", val);
s->intrmask = val;
- ivshmem_update_irq(s);
}
static uint32_t ivshmem_IntrMask_read(IVShmemState *s)
@@ -189,7 +156,6 @@ static void ivshmem_IntrStatus_write(IVShmemState *s, uint32_t val)
IVSHMEM_DPRINTF("IntrStatus write(w) val = 0x%04x\n", val);
s->intrstatus = val;
- ivshmem_update_irq(s);
}
static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
@@ -198,7 +164,6 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
/* reading ISR clears all interrupts */
s->intrstatus = 0;
- ivshmem_update_irq(s);
return ret;
}
--
2.18.1
next prev parent reply other threads:[~2019-12-12 18:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 18:54 [PULL 00/10] Bluetooth removal, and qtest & misc patches Thomas Huth
2019-12-12 18:54 ` [PULL 01/10] hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev Thomas Huth
2019-12-12 18:54 ` [PULL 02/10] hw/usb: Remove the USB bluetooth dongle device Thomas Huth
2019-12-12 18:54 ` [PULL 03/10] Remove the core bluetooth code Thomas Huth
2019-12-12 18:54 ` [PULL 04/10] Remove libbluetooth / bluez from the CI tests Thomas Huth
2019-12-12 18:54 ` [PULL 05/10] tests: fix modules-test 'duplicate test case' error Thomas Huth
2019-12-12 18:54 ` [PULL 06/10] pseries: disable migration-test if /dev/kvm cannot be used Thomas Huth
2019-12-12 18:54 ` Thomas Huth [this message]
2019-12-12 18:54 ` [PULL 08/10] glib: use portable g_setenv() Thomas Huth
2019-12-12 18:54 ` [PULL 09/10] tests/Makefile: Fix check-report.* targets shown in check-help Thomas Huth
2019-12-12 18:54 ` [PULL 10/10] tests: use g_test_rand_int Thomas Huth
2019-12-16 10:27 ` [PULL 00/10] Bluetooth removal, and qtest & misc patches Peter Maydell
2019-12-16 12:08 ` Thomas Huth
2019-12-16 12:29 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191212185424.4675-8-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).