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

[qemu-xen staging-4.19] apic: disable reentrancy detection for apic-msi



commit 305ffdeca8d134e5982e18137fc369eb929b2059
Author:     Alexander Bulekov <alxndr@xxxxxx>
AuthorDate: Thu Apr 27 17:10:13 2023 -0400
Commit:     Michael Tokarev <mjt@xxxxxxxxxx>
CommitDate: Sun Sep 10 19:38:01 2023 +0300

    apic: disable reentrancy detection for apic-msi
    
    As the code is designed for re-entrant calls to apic-msi, mark apic-msi
    as reentrancy-safe.
    
    Signed-off-by: Alexander Bulekov <alxndr@xxxxxx>
    Reviewed-by: Darren Kenny <darren.kenny@xxxxxxxxxx>
    Message-Id: <20230427211013.2994127-9-alxndr@xxxxxx>
    Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
    (cherry picked from commit 50795ee051a342c681a9b45671c552fbd6274db8)
    Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx>
---
 hw/intc/apic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 20b5a94073..ac3d47d231 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -885,6 +885,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;
 
--
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®.