Skip to contentSkip to conversation

x86/hyperv/vtl: Add noop for realmode pointers

PATCH Applied Saurabh Sengar 3 participants 3 messages Apr 24, 2023 – May 8, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/hyperv/vtl: Add noop for realmode pointers

Assign the realmode pointers to noop, instead of NULL to fix kernel panic.

---
 arch/x86/hyperv/hv_vtl.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/hyperv/hv_vtl.c +2 -0
index 1ba5d3b99b16..85d38b9f3586 100644
@@ -20,6 +20,8 @@ void __init hv_vtl_init_platform(void)
 {
 	pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
 
+	x86_platform.realmode_reserve = x86_init_noop;
+	x86_platform.realmode_init = x86_init_noop;
 	x86_init.irqs.pre_vector_init = x86_init_noop;
 	x86_init.timers.timer_init = x86_init_noop;
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

From: Saurabh Sengar <[email protected]> Sent: Monday, April 24, 2023 3:10 AM

Quoted 22 lines

Assign the realmode pointers to noop, instead of NULL to fix kernel panic.

---
 arch/x86/hyperv/hv_vtl.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/hyperv/hv_vtl.c +2 -1
index 1ba5d3b99b16..85d38b9f3586 100644
@@ -20,6 +20,8 @@ void __init hv_vtl_init_platform(void)
 {
 	pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
 
+	x86_platform.realmode_reserve = x86_init_noop;
+	x86_platform.realmode_init = x86_init_noop;
 	x86_init.irqs.pre_vector_init = x86_init_noop;
 	x86_init.timers.timer_init = x86_init_noop;
 
--
Quoted 1 line

2.34.1

maintainer Applied
#2 lore raw
Quoted 22 lines · Michael Kelley (LINUX)

From: Saurabh Sengar <[email protected]> Sent: Monday, April 24, 2023 3:10 AM

Quoted 21 lines

Assign the realmode pointers to noop, instead of NULL to fix kernel panic.

---
 arch/x86/hyperv/hv_vtl.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/hyperv/hv_vtl.c +2 -0
index 1ba5d3b99b16..85d38b9f3586 100644
@@ -20,6 +20,8 @@ void __init hv_vtl_init_platform(void)
 {
 	pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
 
+	x86_platform.realmode_reserve = x86_init_noop;
+	x86_platform.realmode_init = x86_init_noop;
 	x86_init.irqs.pre_vector_init = x86_init_noop;
 	x86_init.timers.timer_init = x86_init_noop;
 
Quoted 5 lines
Quoted 2 lines

--
2.34.1

Applied to hyperv-fixes. Thanks.