On 10/27/2025 1:28 PM, Praveen K Paladugu wrote:
> Without configuing sleep state info within mshv, if a root partition is
> shut down, it will try to shutdown by writing to ACPI regions. These
> writes are intercepted by mshv and will result in a Machine Check
> Exception (MCE).
> 
> Root eventually panics with a trace similar to:
> 
> [   81.306348] reboot: Power down
> [   81.314709] mce: [Hardware Error]: CPU 0: Machine Check Exception: 4 Bank 
> 0: b2000000c0060001
> [   81.314711] mce: [Hardware Error]: TSC 3b8cb60a66 PPIN 11d98332458e4ea9
> [   81.314713] mce: [Hardware Error]: PROCESSOR 0:606a6 TIME 1759339405 
> SOCKET 0 APIC 0 microcode ffffffff
> [   81.314715] mce: [Hardware Error]: Run the above through 'mcelog --ascii'
> [   81.314716] mce: [Hardware Error]: Machine check: Processor context corrupt
> [   81.314717] Kernel panic - not syncing: Fatal machine check
> 
> To prevent this, properly configure sleep states within MSHV, enable a
> reboot notifier, allowing the root partition to cleanly shut down without
> any panics. Only S5 sleep state is enabled for now.
> 
> Signed-off-by: Praveen K Paladugu <[email protected]>
> Co-developed-by: Anatol Belski <[email protected]>
> Signed-off-by: Anatol Belski <[email protected]>
> ---
>  arch/x86/hyperv/hv_init.c       |   8 +++
>  arch/x86/include/asm/mshyperv.h |   2 +
>  drivers/hv/mshv_common.c        | 103 ++++++++++++++++++++++++++++++++
>  3 files changed, 113 insertions(+)
> 

Reviewed-by: Easwar Hariharan <[email protected]>

Reply via email to