mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
KVM: x86: Move vector_hashing into lapic.c
Move the vector_hashing module param into lapic.c now that all usage is contained within the local APIC emulation code. Opportunistically drop the accessor and append "_enabled" to the variable to help capture that it's a boolean module param. No functional change intended. Link: https://lore.kernel.org/r/20250821214209.3463350-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
73473f31a4
commit
aac057dd62
|
|
@ -74,6 +74,10 @@ module_param(lapic_timer_advance, bool, 0444);
|
|||
#define LAPIC_TIMER_ADVANCE_NS_MAX 5000
|
||||
/* step-by-step approximation to mitigate fluctuation */
|
||||
#define LAPIC_TIMER_ADVANCE_ADJUST_STEP 8
|
||||
|
||||
static bool __read_mostly vector_hashing_enabled = true;
|
||||
module_param_named(vector_hashing, vector_hashing_enabled, bool, 0444);
|
||||
|
||||
static int kvm_lapic_msr_read(struct kvm_lapic *apic, u32 reg, u64 *data);
|
||||
static int kvm_lapic_msr_write(struct kvm_lapic *apic, u32 reg, u64 data);
|
||||
|
||||
|
|
@ -1150,7 +1154,7 @@ static inline bool kvm_apic_map_get_dest_lapic(struct kvm *kvm,
|
|||
if (!kvm_lowest_prio_delivery(irq))
|
||||
return true;
|
||||
|
||||
if (!kvm_vector_hashing_enabled()) {
|
||||
if (!vector_hashing_enabled) {
|
||||
lowest = -1;
|
||||
for_each_set_bit(i, bitmap, 16) {
|
||||
if (!(*dst)[i])
|
||||
|
|
@ -1291,7 +1295,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
|
|||
r = 0;
|
||||
r += kvm_apic_set_irq(vcpu, irq, dest_map);
|
||||
} else if (kvm_apic_sw_enabled(vcpu->arch.apic)) {
|
||||
if (!kvm_vector_hashing_enabled()) {
|
||||
if (!vector_hashing_enabled) {
|
||||
if (!lowest)
|
||||
lowest = vcpu;
|
||||
else if (kvm_apic_compare_prio(vcpu, lowest) < 0)
|
||||
|
|
|
|||
|
|
@ -164,9 +164,6 @@ module_param(kvmclock_periodic_sync, bool, 0444);
|
|||
static u32 __read_mostly tsc_tolerance_ppm = 250;
|
||||
module_param(tsc_tolerance_ppm, uint, 0644);
|
||||
|
||||
static bool __read_mostly vector_hashing = true;
|
||||
module_param(vector_hashing, bool, 0444);
|
||||
|
||||
bool __read_mostly enable_vmware_backdoor = false;
|
||||
module_param(enable_vmware_backdoor, bool, 0444);
|
||||
EXPORT_SYMBOL_GPL(enable_vmware_backdoor);
|
||||
|
|
@ -13549,11 +13546,6 @@ bool kvm_arch_has_noncoherent_dma(struct kvm *kvm)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_arch_has_noncoherent_dma);
|
||||
|
||||
bool kvm_vector_hashing_enabled(void)
|
||||
{
|
||||
return vector_hashing;
|
||||
}
|
||||
|
||||
bool kvm_arch_no_poll(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return (vcpu->arch.msr_kvm_poll_control & 1) == 0;
|
||||
|
|
|
|||
|
|
@ -431,7 +431,6 @@ void kvm_deliver_exception_payload(struct kvm_vcpu *vcpu,
|
|||
|
||||
int kvm_mtrr_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data);
|
||||
int kvm_mtrr_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);
|
||||
bool kvm_vector_hashing_enabled(void);
|
||||
void kvm_fixup_and_inject_pf_error(struct kvm_vcpu *vcpu, gva_t gva, u16 error_code);
|
||||
int x86_decode_emulated_instruction(struct kvm_vcpu *vcpu, int emulation_type,
|
||||
void *insn, int insn_len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user