[PATCH hyperv-next v3 0/2] x86/hyperv: VTL mode reboot fixes

Roman Kisel posted 2 patches 9 months, 3 weeks ago
arch/x86/hyperv/hv_vtl.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
[PATCH hyperv-next v3 0/2] x86/hyperv: VTL mode reboot fixes
Posted by Roman Kisel 9 months, 3 weeks ago
The first patch defines a specialized machine emergency restart
callback not to write to the physical address of 0x472 which is
what the native_machine_emergency_restart() does unconditionally.

I first wanted to tweak that function[1], and in the course of
the discussion it looked as the risks of doing that would
outweigh the benefit: the bare-metal systems have likely adopted
that behavior as a standard although I could not find any mentions
of that magic address in the UEFI+ACPI specification.

The second patch removes the need to always supply "reboot=t"
to the kernel command line in the OpenHCL bootloader[2]. There is
no other option at the moment; when/if it appears the newly added
callback's code can be adjusted as required.

[1] https://lore.kernel.org/all/20250109204352.1720337-1-romank@linux.microsoft.com/
[2] https://github.com/microsoft/openvmm/blob/7a9d0e0a00461be6e5f3267af9ea54cc7157c900/openhcl/openhcl_boot/src/main.rs#L139

[V3]:
    - Added verbs to the patch titles.
      ** Thank you, Ingo!**

[V2]: https://lore.kernel.org/linux-hyperv/97010881-4b5e-4fb7-b8b3-b6c9e440e692@linux.microsoft.com/
    - Fixed the warning from the kernel robot about using C23.
      ** Thank you, kernel robot!**

    - Tightened up wording in the comments and the commit
      descriptions.
      ** Thank you, Saurabh!**

    - Dropped the CC: stable tag as there is no specific commit
      this patch series fixes.
      ** Thank you, Saurabh!**

[V1]: https://lore.kernel.org/linux-hyperv/20250117210702.1529580-1-romank@linux.microsoft.com/

Roman Kisel (2):
  x86/hyperv: Add VTL mode emergency restart callback
  x86/hyperv: Add VTL mode callback for restarting the system

 arch/x86/hyperv/hv_vtl.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)


base-commit: 3a7f7785eae7cf012af128ca9e383c91e4955354
-- 
2.43.0
Re: [PATCH hyperv-next v3 0/2] x86/hyperv: VTL mode reboot fixes
Posted by Wei Liu 9 months, 1 week ago
On Thu, Feb 27, 2025 at 01:47:26PM -0800, Roman Kisel wrote:
> The first patch defines a specialized machine emergency restart
> callback not to write to the physical address of 0x472 which is
> what the native_machine_emergency_restart() does unconditionally.
> 
> I first wanted to tweak that function[1], and in the course of
> the discussion it looked as the risks of doing that would
> outweigh the benefit: the bare-metal systems have likely adopted
> that behavior as a standard although I could not find any mentions
> of that magic address in the UEFI+ACPI specification.
> 
> The second patch removes the need to always supply "reboot=t"
> to the kernel command line in the OpenHCL bootloader[2]. There is
> no other option at the moment; when/if it appears the newly added
> callback's code can be adjusted as required.
> 
> [1] https://lore.kernel.org/all/20250109204352.1720337-1-romank@linux.microsoft.com/
> [2] https://github.com/microsoft/openvmm/blob/7a9d0e0a00461be6e5f3267af9ea54cc7157c900/openhcl/openhcl_boot/src/main.rs#L139
> 
> [V3]:
>     - Added verbs to the patch titles.
>       ** Thank you, Ingo!**
> 
> [V2]: https://lore.kernel.org/linux-hyperv/97010881-4b5e-4fb7-b8b3-b6c9e440e692@linux.microsoft.com/
>     - Fixed the warning from the kernel robot about using C23.
>       ** Thank you, kernel robot!**
> 
>     - Tightened up wording in the comments and the commit
>       descriptions.
>       ** Thank you, Saurabh!**
> 
>     - Dropped the CC: stable tag as there is no specific commit
>       this patch series fixes.
>       ** Thank you, Saurabh!**
> 
> [V1]: https://lore.kernel.org/linux-hyperv/20250117210702.1529580-1-romank@linux.microsoft.com/
> 
> Roman Kisel (2):
>   x86/hyperv: Add VTL mode emergency restart callback
>   x86/hyperv: Add VTL mode callback for restarting the system
> 

Applied to hyperv-next. Thanks.