[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.6 12/51] apic: disable reentrancy detection for apic-msi
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.6 12/51] apic: disable reentrancy detection for apic-msi |
Date: |
Mon, 11 Sep 2023 11:02:03 +0300 |
From: Alexander Bulekov <alxndr@bu.edu>
As the code is designed for re-entrant calls to apic-msi, mark apic-msi
as reentrancy-safe.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20230427211013.2994127-9-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 50795ee051a342c681a9b45671c552fbd6274db8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 3df11c34d6..a7c2b301a8 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -883,6 +883,13 @@ static void apic_realize(DeviceState *dev, Error **errp)
memory_region_init_io(&s->io_memory, OBJECT(s), &apic_io_ops, s,
"apic-msi",
APIC_SPACE_SIZE);
+ /*
+ * apic-msi's apic_mem_write can call into ioapic_eoi_broadcast, which can
+ * write back to apic-msi. As such mark the apic-msi region re-entrancy
+ * safe.
+ */
+ s->io_memory.disable_reentrancy_guard = true;
+
s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, apic_timer, s);
local_apics[s->id] = s;
--
2.39.2
- [Stable-7.2.6 03/51] memory: prevent dma-reentracy issues, (continued)
- [Stable-7.2.6 03/51] memory: prevent dma-reentracy issues, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 02/51] python: drop pipenv, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 06/51] checkpatch: add qemu_bh_new/aio_bh_new checks, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 05/51] async: avoid use-after-free on re-entrancy guard, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 04/51] async: Add an optional reentrancy guard to the BH API, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 07/51] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 08/51] lsi53c895a: disable reentrancy detection for script RAM, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 09/51] lsi53c895a: disable reentrancy detection for MMIO region, too, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 11/51] raven: disable reentrancy detection for iomem, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 10/51] bcm2835_property: disable reentrancy detection for iomem, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 12/51] apic: disable reentrancy detection for apic-msi,
Michael Tokarev <=
- [Stable-7.2.6 13/51] loongarch: mark loongarch_ipi_iocsr re-entrnacy safe, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 14/51] pnv_lpc: disable reentrancy detection for lpc-hc, Michael Tokarev, 2023/09/11
- [Stable-7.2.6 43/51] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set, Michael Tokarev, 2023/09/11