qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.ibm.com>
To: "Alexander Bulekov" <alxndr@bu.edu>, "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>,
	"open list:PowerNV Non-Virtu..." <qemu-ppc@nongnu.org>
Subject: Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc
Date: Mon, 15 May 2023 14:48:47 +0200	[thread overview]
Message-ID: <71f07442-f4be-4efe-db1a-49f59b7bdbcb@linux.ibm.com> (raw)
In-Reply-To: <20230511091509.nypeyd5fhzxlvo47@mozz.bu.edu>



On 11/05/2023 11:15, Alexander Bulekov wrote:
> On 230511 1104, Cédric Le Goater wrote:
>> Hello Alexander
>>
>> On 5/11/23 10:53, Alexander Bulekov wrote:
>>> 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);
>>
>> The warning changed :
>>
>>    qemu-system-ppc64: warning: Blocked re-entrant IO on MemoryRegion: lpc-opb-master at addr: 0x8
>>
>> I will take a look unless you know exactly what to do.
>>
> 
> That does not show up for me with "./qemu-system-ppc64 -M powernv8"
> Do I need to boot a kernel to see the message?
> 
> I was worried that there might be other re-entrant IO in this device.
> Maybe there should be a way to just mark the whole device re-entrancy
> safe.

Hello,

I was also started hitting it, with machine powernv10. And indeed, 
disabling the check on both lpc_hc_regs and opb_master_regs should be 
all we need (and it's working fine for me).

   Fred



  parent reply	other threads:[~2023-05-15 12:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71f07442-f4be-4efe-db1a-49f59b7bdbcb@linux.ibm.com \
    --to=fbarrat@linux.ibm.com \
    --cc=alxndr@bu.edu \
    --cc=clg@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).