]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86/hyperv: Move hv crash init after hypercall pg setup
authorMukesh R <mrathor@linux.microsoft.com>
Wed, 4 Feb 2026 01:58:00 +0000 (17:58 -0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:46 +0000 (07:20 -0500)
[ Upstream commit c3a6ae7ea2d3f507cbddb5818ccc65b9d84d6dc7 ]

hv_root_crash_init() is not setting up the hypervisor crash collection
for baremetal cases because when it's called, hypervisor page is not
setup.

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

Signed-off-by: Mukesh Rathor <mrathor@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/hyperv/hv_init.c

index 14de43f4bc6c180c3518e37eeb1a1fc2ae02f175..7f3301bd081ec571d83b1934a4a6edbbbc9fee2e 100644 (file)
@@ -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