Skip to contentSkip to conversation

x86/hyperv/vtl: Stop kernel from probing VTL0 low memory

PATCH New Naman Jain 3 participants 3 messages Jan 16, 2025 – Feb 12, 2025

Subsystems (3)
lore
Share & tools
lore

Naman Jain

author
#0 lore raw

PATCH 1/1 x86/hyperv/vtl: Stop kernel from probing VTL0 low memory

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.

---
 arch/x86/hyperv/hv_vtl.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/hyperv/hv_vtl.c +1 -0
index 4e1b1e3b5658..3f4e20d7b724 100644
@@ -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;

base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc

Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/1 x86/hyperv/vtl: Stop kernel from probing VTL0 low memory

Quoted 27 lines

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.

---
 arch/x86/hyperv/hv_vtl.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/hyperv/hv_vtl.c +1 -0
index 4e1b1e3b5658..3f4e20d7b724 100644
@@ -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;
Quoted 3 lines

base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc

Signature · 1 line
2.43.0

Thanks, Naman!

maintainer Applied
#2 lore raw
Quoted 27 lines · Roman Kisel
Quoted 27 lines

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.

---
 arch/x86/hyperv/hv_vtl.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/hyperv/hv_vtl.c +1 -0
index 4e1b1e3b5658..3f4e20d7b724 100644
@@ -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;
Quoted 8 lines
Quoted 3 lines

base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc

Signature · 1 line
2.43.0

Thanks, Naman!

Applied to hyperv-fixes. Thanks.