Skip to content

Commit afefdb2

Browse files
mhklinuxliuw
authored andcommitted
x86/hyperv: Update comment in hyperv_cleanup()
The comment in hyperv_cleanup() became out-of-date as a result of commit c8ed081 ("x86/hyperv: Use direct call to hypercall-page"). Update the comment. No code or functional change. Signed-off-by: Michael Kelley <[email protected]> Signed-off-by: Wei Liu <[email protected]>
1 parent 2b42461 commit afefdb2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

arch/x86/hyperv/hv_init.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,13 @@ void hyperv_cleanup(void)
635635
hv_ivm_msr_write(HV_X64_MSR_GUEST_OS_ID, 0);
636636

637637
/*
638-
* Reset hypercall page reference before reset the page,
639-
* let hypercall operations fail safely rather than
640-
* panic the kernel for using invalid hypercall page
638+
* Reset hv_hypercall_pg before resetting it in the hypervisor.
639+
* hv_set_hypercall_pg(NULL) is not used because at this point in the
640+
* panic path other CPUs have been stopped, causing static_call_update()
641+
* to hang. So resetting hv_hypercall_pg to cause hypercalls to fail
642+
* cleanly is only operative on 32-bit builds. But this is OK as it is
643+
* just a preventative measure to ease detecting a hypercall being made
644+
* after this point, which shouldn't be happening anyway.
641645
*/
642646
hv_hypercall_pg = NULL;
643647

0 commit comments

Comments
 (0)