Re: [PATCH] x86/CPU/AMD: Don't print reset reason in VMs

From: Juergen Gross

Date: Wed Nov 04 2026 - 03:25:34 EST


On 04.11.26 02:30, Jason Andryuk wrote:
print_s5_reset_status_mmio() expects to read FCH MMIO on baremetal. VMs
don't have emulated FCH registers, so there is nothing to check. Add an
early exit when running on a hypervisor.

The real motivation is Xen PV domUs can't boot on Zen CPUs. PV domUs
PTE contain system physical addresses - they don't have concept of guest
physical addresses. domUs can only map physical addresses they are
assigned, so a domU fails to map the FCH MMIO addresses. However
set_pte() does not return failure, so ioremap() returns a pointer while
the PTEs are unpopulated. print_s5_reset_status_mmio() faults when
reading through the pointer, breaking the boot. This change fixes Xen
PV domUs booting on Zen CPUs.

dom0 can map the FCH MMIO, but it has X86_FEATURE_HYPERVISOR set. With
this change, it no longer prints the reset reason.

Fixes: ab8131028710 ("x86/CPU/AMD: Print the reason for the last reset")
Cc: stable@xxxxxxxxxxxxxxx
Suggested-by: Borislav Petkov <bp@xxxxxxxxx>
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature