[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag
From: |
Nicholas Piggin |
Subject: |
[PATCH 1/3] ipmi/bmc-sim: implement watchdog dont log flag |
Date: |
Mon, 31 Mar 2025 22:57:22 +1000 |
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));
+ }
+
switch (IPMI_BMC_WATCHDOG_GET_ACTION(ibs)) {
case IPMI_BMC_WATCHDOG_ACTION_NONE:
sensor_set_discrete_bit(ibs, IPMI_WATCHDOG_SENSOR, 0, 1,
--
2.47.1
[PATCH 2/3] ipmi/bmc-sim: add error handling for 'Set BMC Global Enables' command, Nicholas Piggin, 2025/03/31
[PATCH 3/3] ipmi/bmc-sim: Add 'Get Channel Info' command, Nicholas Piggin, 2025/03/31