Skip to content

Commit bafddc7

Browse files
committed
KVM: VMX: Move enable_ipiv knob to common x86
Move enable_ipiv to common x86 so that it can be reused by SVM to control IPI virtualization when AVIC is enabled. SVM doesn't actually provide a way to truly disable IPI virtualization, but KVM can get close enough by skipping the necessary table programming. Link: https://lore.kernel.org/r/20250611224604.313496-18-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent d294333 commit bafddc7

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,7 @@ struct kvm_arch_async_pf {
19511951
extern u32 __read_mostly kvm_nr_uret_msrs;
19521952
extern bool __read_mostly allow_smaller_maxphyaddr;
19531953
extern bool __read_mostly enable_apicv;
1954+
extern bool __read_mostly enable_ipiv;
19541955
extern bool __read_mostly enable_device_posted_irqs;
19551956
extern struct kvm_x86_ops kvm_x86_ops;
19561957

arch/x86/kvm/vmx/capabilities.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ extern bool __read_mostly enable_ept;
1515
extern bool __read_mostly enable_unrestricted_guest;
1616
extern bool __read_mostly enable_ept_ad_bits;
1717
extern bool __read_mostly enable_pml;
18-
extern bool __read_mostly enable_ipiv;
1918
extern int __read_mostly pt_mode;
2019

2120
#define PT_MODE_SYSTEM 0

arch/x86/kvm/vmx/vmx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ static bool __read_mostly fasteoi = 1;
113113
module_param(fasteoi, bool, 0444);
114114

115115
module_param(enable_apicv, bool, 0444);
116-
117-
bool __read_mostly enable_ipiv = true;
118116
module_param(enable_ipiv, bool, 0444);
119117

120118
module_param(enable_device_posted_irqs, bool, 0444);

arch/x86/kvm/x86.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ EXPORT_SYMBOL_GPL(allow_smaller_maxphyaddr);
226226
bool __read_mostly enable_apicv = true;
227227
EXPORT_SYMBOL_GPL(enable_apicv);
228228

229+
bool __read_mostly enable_ipiv = true;
230+
EXPORT_SYMBOL_GPL(enable_ipiv);
231+
229232
bool __read_mostly enable_device_posted_irqs = true;
230233
EXPORT_SYMBOL_GPL(enable_device_posted_irqs);
231234

0 commit comments

Comments
 (0)