diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-04 15:15:43 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-02-08 08:45:35 -0500 |
commit | dcf0926e9b899eca754a07c4064de69815b85a38 (patch) | |
tree | de9e6a5fb01f4eaceadc456e411002ba5422d0b1 /tools/arch | |
parent | a6d5433801c6629cda6cda6d8bdaefc204953abf (diff) | |
download | lwn-dcf0926e9b899eca754a07c4064de69815b85a38.tar.gz lwn-dcf0926e9b899eca754a07c4064de69815b85a38.zip |
x86: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM)
It is more accurate to check if KVM is enabled, instead of having the
architecture say so. Architectures always "have" KVM, so for example
checking CONFIG_HAVE_KVM in x86 code is pointless, but if KVM is disabled
in a specific build, there is no need for support code.
Alternatively, many of the #ifdefs could simply be deleted. However,
this would add completely dead code. For example, when KVM is disabled,
there should not be any posted interrupts, i.e. NOT wiring up the "dummy"
handlers and treating IRQs on those vectors as spurious is the right
thing to do.
Cc: x86@kernel.org
Cc: kbingham@kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/arch')
-rw-r--r-- | tools/arch/x86/include/asm/irq_vectors.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/arch/x86/include/asm/irq_vectors.h b/tools/arch/x86/include/asm/irq_vectors.h index 3a19904c2db6..3f73ac3ed3a0 100644 --- a/tools/arch/x86/include/asm/irq_vectors.h +++ b/tools/arch/x86/include/asm/irq_vectors.h @@ -84,7 +84,7 @@ #define HYPERVISOR_CALLBACK_VECTOR 0xf3 /* Vector for KVM to deliver posted interrupt IPI */ -#ifdef CONFIG_HAVE_KVM +#if IS_ENABLED(CONFIG_KVM) #define POSTED_INTR_VECTOR 0xf2 #define POSTED_INTR_WAKEUP_VECTOR 0xf1 #define POSTED_INTR_NESTED_VECTOR 0xf0 |