]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/hyperv/vtl: Stop kernel from probing VTL0 low memory
authorNaman Jain <namjain@linux.microsoft.com>
Thu, 16 Jan 2025 06:12:24 +0000 (06:12 +0000)
committerWei Liu <wei.liu@kernel.org>
Wed, 12 Feb 2025 02:16:56 +0000 (02:16 +0000)
For Linux, running in Hyper-V VTL (Virtual Trust Level), kernel in VTL2
tries to access VTL0 low memory in probe_roms. This memory is not
described in the e820 map. Initialize probe_roms call to no-ops
during boot for VTL2 kernel to avoid this. The issue got identified
in OpenVMM which detects invalid accesses initiated from kernel running
in VTL2.

Co-developed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Tested-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250116061224.1701-1-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250116061224.1701-1-namjain@linux.microsoft.com>

arch/x86/hyperv/hv_vtl.c

index 4e1b1e3b565841eb26f3a11e61fbae81edf4a174..3f4e20d7b724be57367e05f9d4a698c1ab0a1da1 100644 (file)
@@ -30,6 +30,7 @@ void __init hv_vtl_init_platform(void)
        x86_platform.realmode_init = x86_init_noop;
        x86_init.irqs.pre_vector_init = x86_init_noop;
        x86_init.timers.timer_init = x86_init_noop;
+       x86_init.resources.probe_roms = x86_init_noop;
 
        /* Avoid searching for BIOS MP tables */
        x86_init.mpparse.find_mptable = x86_init_noop;