]> www.infradead.org Git - linux.git/commitdiff
KVM: Delete the now unused kvm_arch_sched_in()
authorSean Christopherson <seanjc@google.com>
Wed, 22 May 2024 01:40:11 +0000 (18:40 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 11 Jun 2024 21:18:45 +0000 (14:18 -0700)
Delete kvm_arch_sched_in() now that all implementations are nops.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20240522014013.1672962-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/arm64/include/asm/kvm_host.h
arch/loongarch/include/asm/kvm_host.h
arch/mips/include/asm/kvm_host.h
arch/powerpc/include/asm/kvm_host.h
arch/riscv/include/asm/kvm_host.h
arch/s390/include/asm/kvm_host.h
arch/x86/kvm/pmu.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c

index 8170c04fde914c8d09f299f82c9492c8a2afea5b..615e7a2e559063c966a2de36a43e13450e3d4420 100644 (file)
@@ -1225,7 +1225,6 @@ static inline bool kvm_system_needs_idmapped_vectors(void)
 }
 
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 
 void kvm_arm_init_debug(void);
 void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu);
index c87b6ea0ec47a97e69a6e86094e729cc1aadf69c..4162a252cdf6fa48833c588465ea1dae49cd3b73 100644 (file)
@@ -261,7 +261,6 @@ static inline bool kvm_is_ifetch_fault(struct kvm_vcpu_arch *arch)
 static inline void kvm_arch_hardware_unsetup(void) {}
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
 static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
index 179f320cc2313b985d3a6d03c6437c85aa69a7dc..6743a57c1ab43d3bcfa39ecdd24b8d436635b836 100644 (file)
@@ -890,7 +890,6 @@ static inline void kvm_arch_sync_events(struct kvm *kvm) {}
 static inline void kvm_arch_free_memslot(struct kvm *kvm,
                                         struct kvm_memory_slot *slot) {}
 static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
 
index 8abac532146e7b2744e4dd70bfecd373946a39f4..c4fb6a27fb924c740e4bab93338bb6e2c02d1d46 100644 (file)
@@ -897,7 +897,6 @@ struct kvm_vcpu_arch {
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
 static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
 static inline void kvm_arch_flush_shadow_all(struct kvm *kvm) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {}
 
index d962812785868bb09d39fa01eff5c918f23bbdaa..dd77c2db6819408fdd51b27833d5e16ca472bfb8 100644 (file)
@@ -286,7 +286,6 @@ struct kvm_vcpu_arch {
 };
 
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 
 #define KVM_RISCV_GSTAGE_TLB_MIN_ORDER         12
 
index 95990461888fcaee7759af29874071207797ad74..e9fcaf4607a6cd9ee003e9829557decd3e33f45c 100644 (file)
@@ -1045,7 +1045,6 @@ extern int kvm_s390_gisc_register(struct kvm *kvm, u32 gisc);
 extern int kvm_s390_gisc_unregister(struct kvm *kvm, u32 gisc);
 
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
-static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
 static inline void kvm_arch_free_memslot(struct kvm *kvm,
                                         struct kvm_memory_slot *slot) {}
 static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {}
index a593b03c9aed677efb34c5925c57887023bae0f4..f9149c9fc275eee3e5080ecb0f85ae2227df163b 100644 (file)
@@ -521,9 +521,9 @@ void kvm_pmu_handle_event(struct kvm_vcpu *vcpu)
        }
 
        /*
-        * Unused perf_events are only released if the corresponding MSRs
-        * weren't accessed during the last vCPU time slice. kvm_arch_sched_in
-        * triggers KVM_REQ_PMU if cleanup is needed.
+        * Release unused perf_events if the corresponding guest MSRs weren't
+        * accessed during the last vCPU time slice (need_cleanup is set when
+        * the vCPU is scheduled back in).
         */
        if (unlikely(pmu->need_cleanup))
                kvm_pmu_cleanup(vcpu);
index 75d413ffcd5f56305ff1dbd4e57054dbbac8e5f6..6830cd389fc2cb56f28c2b6ea9c99c76c5aa595a 100644 (file)
@@ -12575,11 +12575,6 @@ bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
        return (vcpu->arch.apic_base & MSR_IA32_APICBASE_BSP) != 0;
 }
 
-void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu)
-{
-
-}
-
 void kvm_arch_free_vm(struct kvm *kvm)
 {
 #if IS_ENABLED(CONFIG_HYPERV)
index 5e04c6cae34a4071fac2cfc137d7ee98584b601d..7b9d2633a9315a35dfe271f9cdd76ea088345294 100644 (file)
@@ -1495,8 +1495,6 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
                                        struct kvm_guest_debug *dbg);
 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu);
 
-void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu);
-
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
 int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id);
index 007d8380062b432f993ae9b5eadacc2bfb423200..b60186b9c1d3724d59ccd545aa0eb4b0917c8cf9 100644 (file)
@@ -6292,7 +6292,6 @@ static void kvm_sched_in(struct preempt_notifier *pn, int cpu)
        WRITE_ONCE(vcpu->ready, false);
 
        __this_cpu_write(kvm_running_vcpu, vcpu);
-       kvm_arch_sched_in(vcpu, cpu);
        kvm_arch_vcpu_load(vcpu, cpu);
 
        WRITE_ONCE(vcpu->scheduled_out, false);