[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen staging-4.19] loongarch: mark loongarch_ipi_iocsr re-entrnacy safe



commit 48c04e42f033bf2e717052d99192fada589d62b3
Author:     Alexander Bulekov <alxndr@xxxxxx>
AuthorDate: Sat May 6 07:21:45 2023 -0400
Commit:     Michael Tokarev <mjt@xxxxxxxxxx>
CommitDate: Sun Sep 10 19:38:01 2023 +0300

    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@xxxxxx>
    Reviewed-by: Song Gao <gaosong@xxxxxxxxxxx>
    Message-Id: <20230506112145.3563708-1-alxndr@xxxxxx>
    Signed-off-by: Song Gao <gaosong@xxxxxxxxxxx>
    (cherry picked from commit 6d0589e0e6c64b888864a2bf980537be20389264)
    Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx>
---
 hw/intc/loongarch_ipi.c | 4 ++++
 1 file changed, 4 insertions(+)

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,
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.19



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.