]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/extra/0007-bcm2835_property-disable-reentrancy-detection-for-io.patch
buildsys: use QEMU's keycodemapdb again
[pve-qemu.git] / debian / patches / extra / 0007-bcm2835_property-disable-reentrancy-detection-for-io.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Alexander Bulekov <alxndr@bu.edu>
3 Date: Thu, 27 Apr 2023 17:10:11 -0400
4 Subject: [PATCH] bcm2835_property: disable reentrancy detection for iomem
5
6 As the code is designed for re-entrant calls from bcm2835_property to
7 bcm2835_mbox and back into bcm2835_property, mark iomem as
8 reentrancy-safe.
9
10 Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
11 Reviewed-by: Thomas Huth <thuth@redhat.com>
12 Message-Id: <20230427211013.2994127-7-alxndr@bu.edu>
13 Signed-off-by: Thomas Huth <thuth@redhat.com>
14 (cherry-picked from commit 985c4a4e547afb9573b6bd6843d20eb2c3d1d1cd)
15 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
16 ---
17 hw/misc/bcm2835_property.c | 7 +++++++
18 1 file changed, 7 insertions(+)
19
20 diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
21 index 890ae7bae5..de056ea2df 100644
22 --- a/hw/misc/bcm2835_property.c
23 +++ b/hw/misc/bcm2835_property.c
24 @@ -382,6 +382,13 @@ static void bcm2835_property_init(Object *obj)
25
26 memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_property_ops, s,
27 TYPE_BCM2835_PROPERTY, 0x10);
28 +
29 + /*
30 + * bcm2835_property_ops call into bcm2835_mbox, which in-turn reads from
31 + * iomem. As such, mark iomem as re-entracy safe.
32 + */
33 + s->iomem.disable_reentrancy_guard = true;
34 +
35 sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->iomem);
36 sysbus_init_irq(SYS_BUS_DEVICE(s), &s->mbox_irq);
37 }