Skip to contentSkip to conversation

x86/fred: fix building without CONFIG_KVM

PATCH In review Arnd Bergmann 3 participants 3 messages Feb 16, 2024 – Feb 19, 2024

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

PATCH 1/1 x86/fred: fix building without CONFIG_KVM

From: Arnd Bergmann <[email protected]>

Some constants are only defined if KVM is enabled:

arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR'
117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi),
| ^
arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR'
118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi),
| ^
arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR'
119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi),
| ^

Hiding the references behind the same preprocessor conditional is probably the best fix here.

Fixes 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code")
---
 arch/x86/entry/entry_fred.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/entry/entry_fred.c +2 -0
index ac120cbdaaf2..660b7f7f9a79 100644
@@ -114,9 +114,11 @@ static idtentry_t sysvec_table[NR_SYSTEM_VECTORS] __ro_after_init = {
 
 	SYSVEC(IRQ_WORK_VECTOR,			irq_work),
 
+#if IS_ENABLED(CONFIG_KVM)
 	SYSVEC(POSTED_INTR_VECTOR,		kvm_posted_intr_ipi),
 	SYSVEC(POSTED_INTR_WAKEUP_VECTOR,	kvm_posted_intr_wakeup_ipi),
 	SYSVEC(POSTED_INTR_NESTED_VECTOR,	kvm_posted_intr_nested_ipi),
+#endif
 };
 
 static bool fred_setup_done __initdata;
Signature · 1 line
2.39.2
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Some constants are only defined if KVM is enabled:

arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR'
117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi),
| ^
arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR'
118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi),
| ^
arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR'
119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi),
| ^

Quoted 5 lines

Hiding the references behind the same preprocessor conditional is probably the best fix here.

Fixes 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code")

Thanks.

Quoted 20 lines
---
 arch/x86/entry/entry_fred.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/entry/entry_fred.c +2 -0
index ac120cbdaaf2..660b7f7f9a79 100644
@@ -114,9 +114,11 @@ static idtentry_t sysvec_table[NR_SYSTEM_VECTORS] __ro_after_init = {
 
 	SYSVEC(IRQ_WORK_VECTOR,			irq_work),
 
+#if IS_ENABLED(CONFIG_KVM)
 	SYSVEC(POSTED_INTR_VECTOR,		kvm_posted_intr_ipi),
 	SYSVEC(POSTED_INTR_WAKEUP_VECTOR,	kvm_posted_intr_wakeup_ipi),
 	SYSVEC(POSTED_INTR_NESTED_VECTOR,	kvm_posted_intr_nested_ipi),
+#endif
 };
 
 static bool fred_setup_done __initdata;
Signature · 1 line
#Randy
#2 lore raw
In reply to Arnd Bergmann
Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Some constants are only defined if KVM is enabled:

arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR'
117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi),
| ^
arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR'
118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi),
| ^
arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR'
119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi),
| ^

Quoted 6 lines

Hiding the references behind the same preprocessor conditional is probably the best fix here.

Fixes 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code")

---

Late to the party :-)

https://lore.kernel.org/all/[email protected]