Skip to contentSkip to conversation

KVM: x86: remove X86_LOCAL_APIC #ifdefs

PATCH New Radim Krčmář 1 participant 1 message Oct 6, 2017

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

PATCH 1/1 KVM: x86: remove X86_LOCAL_APIC #ifdefs

f478e1219ea1 ("KVM: add X86_LOCAL_APIC dependency") made only the defined path possible.

---
 arch/x86/kvm/svm.c | 5 +----
 arch/x86/kvm/vmx.c | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)
arch/x86/kvm/svm.c +1 -4
index 0e68f0b3cbf7..23e79710dddf 100644
@@ -272,9 +272,7 @@ module_param(nested, int, S_IRUGO);
 
 /* enable / disable AVIC */
 static int avic;
-#ifdef CONFIG_X86_LOCAL_APIC
 module_param(avic, int, S_IRUGO);
-#endif
 
 /* enable/disable Virtual VMLOAD VMSAVE */
 static int vls = true;
@@ -1105,8 +1103,7 @@ static __init int svm_hardware_setup(void)
 
 	if (avic) {
 		if (!npt_enabled ||
-		    !boot_cpu_has(X86_FEATURE_AVIC) ||
-		    !IS_ENABLED(CONFIG_X86_LOCAL_APIC)) {
+		    !boot_cpu_has(X86_FEATURE_AVIC)) {
 			avic = false;
 		} else {
 			pr_info("AVIC enabled\n");
arch/x86/kvm/vmx.c +1 -2
index a2b804e10c95..291449c5f6ca 100644
@@ -1163,8 +1163,7 @@ static inline bool cpu_has_vmx_preemption_timer(void)
 
 static inline bool cpu_has_vmx_posted_intr(void)
 {
-	return IS_ENABLED(CONFIG_X86_LOCAL_APIC) &&
-		vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR;
+	return vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR;
 }
 
 static inline bool cpu_has_vmx_apicv(void)
Signature · 1 line
2.14.2