Skip to contentSkip to conversation

x86/hyperv: Update comment in hyperv_cleanup()

PATCH Applied [email protected] 2 participants 2 messages Feb 2 – Feb 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/hyperv: Update comment in hyperv_cleanup()

From: Michael Kelley <[email protected]>

The comment in hyperv_cleanup() became out-of-date as a result of commit c8ed0812646e ("x86/hyperv: Use direct call to hypercall-page").

Update the comment. No code or functional change.

---
 arch/x86/hyperv/hv_init.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
arch/x86/hyperv/hv_init.c +7 -3
index 14de43f4bc6c..a777e43a5de1 100644
@@ -633,9 +633,13 @@ void hyperv_cleanup(void)
 	hv_ivm_msr_write(HV_X64_MSR_GUEST_OS_ID, 0);
 
 	/*
-	 * Reset hypercall page reference before reset the page,
-	 * let hypercall operations fail safely rather than
-	 * panic the kernel for using invalid hypercall page
+	 * Reset hv_hypercall_pg before resetting it in the hypervisor.
+	 * hv_set_hypercall_pg(NULL) is not used because at this point in the
+	 * panic path other CPUs have been stopped, causing static_call_update()
+	 * to hang. So resetting hv_hypercall_pg to cause hypercalls to fail
+	 * cleanly is only operative on 32-bit builds. But this is OK as it is
+	 * just a preventative measure to ease detecting a hypercall being made
+	 * after this point, which shouldn't be happening anyway.
 	 */
 	hv_hypercall_pg = NULL;
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 8 lines · On Mon, Feb 02, 2026 at 08:48:39AM -0800, [email protected] wrote:

From: Michael Kelley <[email protected]>

The comment in hyperv_cleanup() became out-of-date as a result of commit c8ed0812646e ("x86/hyperv: Use direct call to hypercall-page").

Update the comment. No code or functional change.

Applied to hyperv-next.