* [PATCH] apic: disable reentrancy detection for apic-msi
@ 2023-04-27 13:52 Alexander Bulekov
2023-04-27 14:05 ` Darren Kenny
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Bulekov @ 2023-04-27 13:52 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Alexander Bulekov, Michael S. Tsirkin, Paolo Bonzini
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>
---
Based-on: <20230426161951.2948996-1-alxndr@bu.edu>
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;
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] apic: disable reentrancy detection for apic-msi
2023-04-27 13:52 [PATCH] apic: disable reentrancy detection for apic-msi Alexander Bulekov
@ 2023-04-27 14:05 ` Darren Kenny
0 siblings, 0 replies; 2+ messages in thread
From: Darren Kenny @ 2023-04-27 14:05 UTC (permalink / raw)
To: Alexander Bulekov, qemu-devel
Cc: Thomas Huth, Alexander Bulekov, Michael S. Tsirkin, Paolo Bonzini
On Thursday, 2023-04-27 at 09:52:33 -04, Alexander Bulekov wrote:
> 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>
> ---
> Based-on: <20230426161951.2948996-1-alxndr@bu.edu>
>
> 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;
>
> --
> 2.39.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-27 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27 13:52 [PATCH] apic: disable reentrancy detection for apic-msi Alexander Bulekov
2023-04-27 14:05 ` Darren Kenny
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.