[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.6 13/51] loongarch: mark loongarch_ipi_iocsr re-entrnacy saf
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.6 13/51] loongarch: mark loongarch_ipi_iocsr re-entrnacy safe |
Date: |
Mon, 11 Sep 2023 11:02:04 +0300 |
From: Alexander Bulekov <alxndr@bu.edu>
loongarch_ipi_iocsr MRs rely on re-entrant IO through the ipi_send
function. As such, mark these MRs re-entrancy-safe.
Fixes: a2e1753b80 ("memory: prevent dma-reentracy issues")
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20230506112145.3563708-1-alxndr@bu.edu>
Signed-off-by: Song Gao <gaosong@loongson.cn>
(cherry picked from commit 6d0589e0e6c64b888864a2bf980537be20389264)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index aa4bf9eb74..40e98af2ce 100644
--- a/hw/intc/loongarch_ipi.c
+++ b/hw/intc/loongarch_ipi.c
@@ -215,6 +215,10 @@ static void loongarch_ipi_init(Object *obj)
for (cpu = 0; cpu < MAX_IPI_CORE_NUM; cpu++) {
memory_region_init_io(&s->ipi_iocsr_mem[cpu], obj, &loongarch_ipi_ops,
&lams->ipi_core[cpu], "loongarch_ipi_iocsr", 0x48);
+
+ /* loongarch_ipi_iocsr performs re-entrant IO through ipi_send */
+ s->ipi_iocsr_mem[cpu].disable_reentrancy_guard = true;
+
sysbus_init_mmio(sbd, &s->ipi_iocsr_mem[cpu]);
memory_region_init_io(&s->ipi64_iocsr_mem[cpu], obj,
&loongarch_ipi64_ops,
--
2.39.2
- [Stable-7.2.6 02/51] python: drop pipenv, (continued)
- [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, 2023/09/11
- [Stable-7.2.6 13/51] loongarch: mark loongarch_ipi_iocsr re-entrnacy safe,
Michael Tokarev <=
- [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