Skip to contentSkip to conversation

x86/hyperv: Move hv crash init after hypercall pg setup

PATCH In review Mukesh R 2 participants 3 messages Feb 3 – Feb 4

Subsystems (3)
lore
Share & tools
lore

Mukesh R

author
#0 lore raw

PATCH 1/1 x86/hyperv: Move hv crash init after hypercall pg setup

Fix a regression where hv_root_crash_init() fails a hypercall because the hypercall page is not fully setup. The regression is caused by following commit:

commit c8ed0812646e ("x86/hyperv: Use direct call to hypercall-page")

Fix is simple, just move the crash init call after the hypercall page setup.

---
 arch/x86/hyperv/hv_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/hyperv/hv_init.c +3 -1
index 14de43f4bc6c..7f3301bd081e 100644
@@ -558,7 +558,6 @@ void __init hyperv_init(void)
 		memunmap(src);
 
 		hv_remap_tsc_clocksource();
-		hv_root_crash_init();
 		hv_sleep_notifiers_register();
 	} else {
 		hypercall_msr.guest_physical_address = vmalloc_to_pfn(hv_hypercall_pg);
@@ -567,6 +566,9 @@ void __init hyperv_init(void)
 
 	hv_set_hypercall_pg(hv_hypercall_pg);
 
+	if (hv_root_partition())        /* after set hypercall pg */
+		hv_root_crash_init();
+
 skip_hypercall_pg_init:
 	/*
 	 * hyperv_init() is called before LAPIC is initialized: see
Signature · 1 line
2.51.2.vfs.0.1
#1 lore raw
Quoted 6 lines · Mukesh R

Fix a regression where hv_root_crash_init() fails a hypercall because the hypercall page is not fully setup. The regression is caused by following commit:

commit c8ed0812646e ("x86/hyperv: Use direct call to hypercall-page")

Is that the right commit? The named commit was merged in v6.18-rc1 and hv_root_crash_init() was only merged in v6.19-rc1...

Thanks,
Easwar (he/him)

author
#2 lore raw
Quoted 5 lines · Easwar Hariharan
Quoted 4 lines · Mukesh R

Fix a regression where hv_root_crash_init() fails a hypercall because the hypercall page is not fully setup. The regression is caused by following commit:

Quoted 8 lines
Quoted 2 lines

commit c8ed0812646e ("x86/hyperv: Use direct call to hypercall-page")

Is that the right commit? The named commit was merged in v6.18-rc1 and hv_root_crash_init() was only merged in v6.19-rc1...

Thanks,
Easwar (he/him)

Ah, you are right. I guess that commit was not in our internal hyper-next mirror, so testing did not reveal the issue and I did not notice it. Because of few missing things, we've to use internal mirror to test. Anyways, will fix the commit and resend.

Thanks,
-Mukesh