Skip to content

Commit 2a27c43

Browse files
committed
KVM: Delete the now unused kvm_arch_sched_in()
Delete kvm_arch_sched_in() now that all implementations are nops. Reviewed-by: Bibo Mao <[email protected]> Acked-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 8fbb696 commit 2a27c43

File tree

10 files changed

+3
-17
lines changed

10 files changed

+3
-17
lines changed

arch/arm64/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,6 @@ static inline bool kvm_system_needs_idmapped_vectors(void)
12251225
}
12261226

12271227
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
1228-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
12291228

12301229
void kvm_arm_init_debug(void);
12311230
void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu);

arch/loongarch/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ static inline bool kvm_is_ifetch_fault(struct kvm_vcpu_arch *arch)
261261
static inline void kvm_arch_hardware_unsetup(void) {}
262262
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
263263
static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
264-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
265264
static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
266265
static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
267266
static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}

arch/mips/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,6 @@ static inline void kvm_arch_sync_events(struct kvm *kvm) {}
890890
static inline void kvm_arch_free_memslot(struct kvm *kvm,
891891
struct kvm_memory_slot *slot) {}
892892
static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
893-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
894893
static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
895894
static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
896895

arch/powerpc/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,6 @@ struct kvm_vcpu_arch {
897897
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
898898
static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
899899
static inline void kvm_arch_flush_shadow_all(struct kvm *kvm) {}
900-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
901900
static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
902901
static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
903902

arch/riscv/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ struct kvm_vcpu_arch {
286286
};
287287

288288
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
289-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
290289

291290
#define KVM_RISCV_GSTAGE_TLB_MIN_ORDER 12
292291

arch/s390/include/asm/kvm_host.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,6 @@ extern int kvm_s390_gisc_register(struct kvm *kvm, u32 gisc);
10451045
extern int kvm_s390_gisc_unregister(struct kvm *kvm, u32 gisc);
10461046

10471047
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
1048-
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
10491048
static inline void kvm_arch_free_memslot(struct kvm *kvm,
10501049
struct kvm_memory_slot *slot) {}
10511050
static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}

arch/x86/kvm/pmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ void kvm_pmu_handle_event(struct kvm_vcpu *vcpu)
521521
}
522522

523523
/*
524-
* Unused perf_events are only released if the corresponding MSRs
525-
* weren't accessed during the last vCPU time slice. kvm_arch_sched_in
526-
* triggers KVM_REQ_PMU if cleanup is needed.
524+
* Release unused perf_events if the corresponding guest MSRs weren't
525+
* accessed during the last vCPU time slice (need_cleanup is set when
526+
* the vCPU is scheduled back in).
527527
*/
528528
if (unlikely(pmu->need_cleanup))
529529
kvm_pmu_cleanup(vcpu);

arch/x86/kvm/x86.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12575,11 +12575,6 @@ bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
1257512575
return (vcpu->arch.apic_base & MSR_IA32_APICBASE_BSP) != 0;
1257612576
}
1257712577

12578-
void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu)
12579-
{
12580-
12581-
}
12582-
1258312578
void kvm_arch_free_vm(struct kvm *kvm)
1258412579
{
1258512580
#if IS_ENABLED(CONFIG_HYPERV)

include/linux/kvm_host.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,8 +1495,6 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
14951495
struct kvm_guest_debug *dbg);
14961496
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu);
14971497

1498-
void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu);
1499-
15001498
void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
15011499
void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
15021500
int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id);

virt/kvm/kvm_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6292,7 +6292,6 @@ static void kvm_sched_in(struct preempt_notifier *pn, int cpu)
62926292
WRITE_ONCE(vcpu->ready, false);
62936293

62946294
__this_cpu_write(kvm_running_vcpu, vcpu);
6295-
kvm_arch_sched_in(vcpu, cpu);
62966295
kvm_arch_vcpu_load(vcpu, cpu);
62976296

62986297
WRITE_ONCE(vcpu->scheduled_out, false);

0 commit comments

Comments
 (0)