diff options
author | Alexander Bulekov <alxndr@bu.edu> | 2023-05-06 07:21:45 -0400 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2023-05-15 19:09:26 +0800 |
commit | 6d0589e0e6c64b888864a2bf980537be20389264 (patch) | |
tree | 0f02c515001ca1e9566eb473ff8370740c03f66b /hw/intc | |
parent | 8844bb8d896595ee1d25d21c770e6e6f29803097 (diff) | |
download | qemu-6d0589e0e6c64b888864a2bf980537be20389264.zip qemu-6d0589e0e6c64b888864a2bf980537be20389264.tar.gz qemu-6d0589e0e6c64b888864a2bf980537be20389264.tar.bz2 |
loongarch: mark loongarch_ipi_iocsr re-entrnacy safe
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>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/loongarch_ipi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c index bdba0f8..9de7c01 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, |