aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2023-04-27 17:10:13 -0400
committerThomas Huth <thuth@redhat.com>2023-04-28 11:31:54 +0200
commit50795ee051a342c681a9b45671c552fbd6274db8 (patch)
tree0aa875a5f5029b00eafc4eef15760eff0f7d5408
parent6dad5a6810d9c60ca320d01276f6133bbcfa1fc7 (diff)
downloadqemu-50795ee051a342c681a9b45671c552fbd6274db8.zip
qemu-50795ee051a342c681a9b45671c552fbd6274db8.tar.gz
qemu-50795ee051a342c681a9b45671c552fbd6274db8.tar.bz2
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@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>
-rw-r--r--hw/intc/apic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 20b5a94..ac3d47d 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;