public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/fred: fix building without CONFIG_KVM
@ 2024-02-16 20:25 Arnd Bergmann
  2024-02-17  1:46 ` Randy Dunlap
  2024-02-19 15:42 ` Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-02-16 20:25 UTC (permalink / raw)
  To: Xin Li, H. Peter Anvin
  Cc: Arnd Bergmann, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/entry/entry_fred.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c
index ac120cbdaaf2..660b7f7f9a79 100644
--- a/arch/x86/entry/entry_fred.c
+++ b/arch/x86/entry/entry_fred.c
@@ -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;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/fred: fix building without CONFIG_KVM
  2024-02-16 20:25 [PATCH] x86/fred: fix building without CONFIG_KVM Arnd Bergmann
@ 2024-02-17  1:46 ` Randy Dunlap
  2024-02-19 15:42 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2024-02-17  1:46 UTC (permalink / raw)
  To: Arnd Bergmann, Xin Li, H. Peter Anvin
  Cc: Arnd Bergmann, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, linux-kernel



On 2/16/24 12:25, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  arch/x86/entry/entry_fred.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c
> index ac120cbdaaf2..660b7f7f9a79 100644
> --- a/arch/x86/entry/entry_fred.c
> +++ b/arch/x86/entry/entry_fred.c
> @@ -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;

-- 
#Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/fred: fix building without CONFIG_KVM
  2024-02-16 20:25 [PATCH] x86/fred: fix building without CONFIG_KVM Arnd Bergmann
  2024-02-17  1:46 ` Randy Dunlap
@ 2024-02-19 15:42 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2024-02-19 15:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Xin Li, H. Peter Anvin, Arnd Bergmann, Andy Lutomirski,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	linux-kernel

On Fri, Feb 16, 2024, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Late to the party :-)

https://lore.kernel.org/all/20240215133631.136538-1-max.kellermann@ionos.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-19 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 20:25 [PATCH] x86/fred: fix building without CONFIG_KVM Arnd Bergmann
2024-02-17  1:46 ` Randy Dunlap
2024-02-19 15:42 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox