qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc
@ 2023-05-11  8:53 Alexander Bulekov
  2023-05-11  9:04 ` Cédric Le Goater
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Bulekov @ 2023-05-11  8:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Bulekov, Thomas Huth, Cédric Le Goater,
	open list:PowerNV Non-Virtu...

As lpc-hc is designed for re-entrant calls from xscom, mark it
re-entrancy safe.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
 hw/ppc/pnv_lpc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index 01f44c19eb..67fd049a7f 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -738,6 +738,8 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
                                 &lpc->opb_master_regs);
     memory_region_init_io(&lpc->lpc_hc_regs, OBJECT(dev), &lpc_hc_ops, lpc,
                           "lpc-hc", LPC_HC_REGS_OPB_SIZE);
+    /* xscom writes to lpc-hc. As such mark lpc-hc re-entrancy safe */
+    lpc->lpc_hc_regs.disable_reentrancy_guard = true;
     memory_region_add_subregion(&lpc->opb_mr, LPC_HC_REGS_OPB_ADDR,
                                 &lpc->lpc_hc_regs);
 
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc
@ 2023-05-26  7:38 Cédric Le Goater
  2023-05-26  7:55 ` Frederic Barrat
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Cédric Le Goater @ 2023-05-26  7:38 UTC (permalink / raw)
  To: qemu-ppc, Thomas Huth, Daniel Henrique Barboza
  Cc: qemu-devel, Frederic Barrat, Alexander Bulekov,
	Cédric Le Goater

From: Alexander Bulekov <alxndr@bu.edu>

As lpc-hc is designed for re-entrant calls from xscom, mark it
re-entrancy safe.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
[clg: mark opb_master_regs as re-entrancy safe also ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv_lpc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index 01f44c19ebba..605d3908617a 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -734,10 +734,13 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
     /* Create MMIO regions for LPC HC and OPB registers */
     memory_region_init_io(&lpc->opb_master_regs, OBJECT(dev), &opb_master_ops,
                           lpc, "lpc-opb-master", LPC_OPB_REGS_OPB_SIZE);
+    lpc->opb_master_regs.disable_reentrancy_guard = true;
     memory_region_add_subregion(&lpc->opb_mr, LPC_OPB_REGS_OPB_ADDR,
                                 &lpc->opb_master_regs);
     memory_region_init_io(&lpc->lpc_hc_regs, OBJECT(dev), &lpc_hc_ops, lpc,
                           "lpc-hc", LPC_HC_REGS_OPB_SIZE);
+    /* xscom writes to lpc-hc. As such mark lpc-hc re-entrancy safe */
+    lpc->lpc_hc_regs.disable_reentrancy_guard = true;
     memory_region_add_subregion(&lpc->opb_mr, LPC_HC_REGS_OPB_ADDR,
                                 &lpc->lpc_hc_regs);
 
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-27 18:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  8:53 [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc Alexander Bulekov
2023-05-11  9:04 ` Cédric Le Goater
2023-05-11  9:15   ` Alexander Bulekov
2023-05-11  9:36     ` Cédric Le Goater
2023-05-15 12:48     ` Frederic Barrat
2023-05-26  7:06       ` Thomas Huth
2023-05-26  7:37         ` Cédric Le Goater
  -- strict thread matches above, loose matches on Subject: below --
2023-05-26  7:38 Cédric Le Goater
2023-05-26  7:55 ` Frederic Barrat
2023-05-26  8:07 ` Thomas Huth
2023-05-27 18:01 ` Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).