[Skiboot] [PATCH 3/4] ipmi: flush the ipmi message queue before booting a kernel
Nicholas Piggin
npiggin at gmail.com
Mon May 15 19:44:55 AEST 2023
On Mon May 15, 2023 at 6:44 AM AEST, Stewart Smith wrote:
>
>
> > On May 13, 2023, at 05:12, Nicholas Piggin <npiggin at gmail.com> wrote:
> >
> > Bring ipmi to a consistent state before booting a kernel by flushing
> > all outstanding messages. The OS may not start kicking the IPMI state
> > machine for some time.
> >
> > For example, without this change, when booting in QEMU, the IPMI command
> > issued by ipmi_wdt_final_reset() to disable the watchdog is not sent to
> > the BMC before the OS boots, effectively leaving the watchdog enabled
> > until the OS begins to drive OPAL pollers.
>
> Hah, that could be awkward and unpredictable for a payload to have to do a thing within a time.
>
> Nice catch :)
>
> Reviewed-by: Stewart Smith <stewart at flamingspork.com <mailto:stewart at flamingspork.com>>
Thanks!
It started out with adding kvm-unit-tests for the qemu powernv model. I
use skiboot to boot that. When the test cases finish they would hang,
which was my bug because the harness wasn't calling the poller after
issuing OPAL shutdown (which is implemnted as IPMI command so that was
never going through because the state machine was already backed up).
Trying to debug that I got to the IPMI state machine and that it doesn't
entirely process the message queue before booting the OS.
So I only got lucky finding it because I'd added a different bug to the
test harness. Still, I'll take it :)
Thanks,
Nick
More information about the Skiboot
mailing list