]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/hyperv: Add VTL mode emergency restart callback
authorRoman Kisel <romank@linux.microsoft.com>
Thu, 27 Feb 2025 21:47:27 +0000 (13:47 -0800)
committerWei Liu <wei.liu@kernel.org>
Thu, 20 Mar 2025 21:23:03 +0000 (21:23 +0000)
commitced518ad55b4118dd77f8a455a06801b89f2f877
tree669670eb4b2d616197243e4186f56f6e01a30f70
parentfe14262695526145334bfa0bb51fcc365cf6dfb5
x86/hyperv: Add VTL mode emergency restart callback

By default, X86(-64) systems use the emergecy restart routine
in the course of which the code unconditionally writes to
the physical address of 0x472 to indicate the boot mode
to the firmware (BIOS or UEFI).

When the kernel itself runs as a firmware in the VTL mode,
that write corrupts the memory of the guest upon emergency
restarting. Preserving the state intact in that situation
is important for debugging, at least.

Define the specialized machine callback to avoid that write
and use the triple fault to perform emergency restart.

Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250227214728.15672-2-romank@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250227214728.15672-2-romank@linux.microsoft.com>
arch/x86/hyperv/hv_vtl.c