qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: <corey@minyard.net>
Cc: "Corey Minyard" <minyard@acm.org>, <qemu-devel@nongnu.org>
Subject: Re: [PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag
Date: Tue, 01 Apr 2025 08:37:19 +1000	[thread overview]
Message-ID: <D8UT7SKP9L19.126NYIT8BU3AI@gmail.com> (raw)
In-Reply-To: <Z-qU_5RWxK-qpGTn@mail.minyard.net>

On Mon Mar 31, 2025 at 11:13 PM AEST, Corey Minyard wrote:
> On Mon, Mar 31, 2025 at 10:57:22PM +1000, Nicholas Piggin wrote:
>> If the dont-log flag is set in the 'timer use' field for the
>> 'set watchdog' command, a watchdog timeout will not get logged as
>> a timer use expiration.
>> 
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
>>  hw/ipmi/ipmi_bmc_sim.c | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>> 
>> diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
>> index 6157ac71201..32161044c0b 100644
>> --- a/hw/ipmi/ipmi_bmc_sim.c
>> +++ b/hw/ipmi/ipmi_bmc_sim.c
>> @@ -733,7 +733,12 @@ static void ipmi_sim_handle_timeout(IPMIBmcSim *ibs)
>>  
>>   do_full_expiry:
>>      ibs->watchdog_running = 0; /* Stop the watchdog on a timeout */
>> -    ibs->watchdog_expired |= (1 << IPMI_BMC_WATCHDOG_GET_USE(ibs));
>> +
>> +    /* Log the expiry if the don't log bit is clear */
>> +    if (!IPMI_BMC_WATCHDOG_GET_DONT_LOG(ibs)) {
>> +        ibs->watchdog_expired |= (1 << IPMI_BMC_WATCHDOG_GET_USE(ibs));
>> +    }
>> +
>
> Are you sure this is correct?  The spec doesn't say what this means, but
> I would assume this means "Don't add a system log" not "Don't set the
> expiry happened bit".

From IPMI spec, Set Watchdog Timer command timer use field of byte 1
says "timer use (logged on expiration when “don’t log” bit = 0b)".
But it also says it should disable the timeout sensor event logging.
I missed that part, I will see if I can make that work.

Thanks,
Nick


  reply	other threads:[~2025-03-31 22:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 12:57 [PATCH 0/3] ipmi: bmc-sim improvements Nicholas Piggin
2025-03-31 12:57 ` [PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag Nicholas Piggin
2025-03-31 13:13   ` Corey Minyard
2025-03-31 22:37     ` Nicholas Piggin [this message]
2025-03-31 23:03       ` Corey Minyard
2025-04-01  1:36         ` Corey Minyard
2025-03-31 12:57 ` [PATCH 2/3] ipmi/bmc-sim: add error handling for 'Set BMC Global Enables' command Nicholas Piggin
2025-03-31 12:57 ` [PATCH 3/3] ipmi/bmc-sim: Add 'Get Channel Info' command Nicholas Piggin
2025-03-31 13:25   ` Corey Minyard
2025-03-31 23:42     ` Nicholas Piggin
2025-04-01  0:11       ` Corey Minyard

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=D8UT7SKP9L19.126NYIT8BU3AI@gmail.com \
    --to=npiggin@gmail.com \
    --cc=corey@minyard.net \
    --cc=minyard@acm.org \
    --cc=qemu-devel@nongnu.org \
    /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).