Re: [PATCH] x86/CPU/AMD: Prevent reset reasons from being retained among boots

From: Mario Limonciello (AMD) (kernel.org)

Date: Mon Sep 29 2025 - 00:01:54 EST




On 9/16/2025 9:02 AM, Borislav Petkov wrote:
On Sat, Sep 13, 2025 at 10:42:45PM +0800, Rong Zhang wrote:
The S5_RESET_STATUS register is parsed on boot and printed to kmsg.
However, this could sometimes be misleading and lead to users wasting a
lot of time on meaningless debugging for two reasons:

* Some bits are never cleared by hardware. It's the software's
responsibility to clear them as per the Processor Programming Reference
(see Link:).

* Some rare hardware-initiated platform resets do not update the
register at all.

In both cases, a previous reboot could leave its trace in the register,
resulting in users seeing unrelated reboot reasons while debugging
random reboots afterward.

Just a heads-up: we're figuring out internally what the right thing to do here
would be.

Stay tuned.

Thx.


The internal conversation points in the direction of your patch makes sense.

But I don't really see a lot of value in re-reading and printing a debug message about what was cleared and what's still there. Do you see a reason to keep that around?