]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/extra/0006-lsi53c895a-disable-reentrancy-detection-for-script-R.patch
96d254c5bc41cc12a4585da7b8adc38909445447
[pve-qemu.git] / debian / patches / extra / 0006-lsi53c895a-disable-reentrancy-detection-for-script-R.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:10 -0400
4 Subject: [PATCH] lsi53c895a: disable reentrancy detection for script RAM
5
6 As the code is designed to use the memory APIs to access the script ram,
7 disable reentrancy checks for the pseudo-RAM ram_io MemoryRegion.
8
9 In the future, ram_io may be converted from an IO to a proper RAM MemoryRegion.
10
11 Reported-by: Fiona Ebner <f.ebner@proxmox.com>
12 Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
13 Reviewed-by: Thomas Huth <thuth@redhat.com>
14 Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
15 Message-Id: <20230427211013.2994127-6-alxndr@bu.edu>
16 Signed-off-by: Thomas Huth <thuth@redhat.com>
17 (cherry-picked from commit bfd6e7ae6a72b84e2eb9574f56e6ec037f05182c)
18 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
19 ---
20 hw/scsi/lsi53c895a.c | 6 ++++++
21 1 file changed, 6 insertions(+)
22
23 diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
24 index bbf32d3f73..17af67935f 100644
25 --- a/hw/scsi/lsi53c895a.c
26 +++ b/hw/scsi/lsi53c895a.c
27 @@ -2313,6 +2313,12 @@ static void lsi_scsi_realize(PCIDevice *dev, Error **errp)
28 memory_region_init_io(&s->io_io, OBJECT(s), &lsi_io_ops, s,
29 "lsi-io", 256);
30
31 + /*
32 + * Since we use the address-space API to interact with ram_io, disable the
33 + * re-entrancy guard.
34 + */
35 + s->ram_io.disable_reentrancy_guard = true;
36 +
37 address_space_init(&s->pci_io_as, pci_address_space_io(dev), "lsi-pci-io");
38 qdev_init_gpio_out(d, &s->ext_irq, 1);
39