Commit 13a34e06 authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini

KVM: remove garbage arg to *hardware_{en,dis}able

In the beggining was on_each_cpu(), which required an unused argument to
kvm_arch_ops.hardware_{en,dis}able, but this was soon forgotten.

Remove unnecessary arguments that stem from this.

Signed-off-by: Radim KrčmáŠ<rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 0865e636
...@@ -230,7 +230,7 @@ static inline void vgic_arch_setup(const struct vgic_params *vgic) ...@@ -230,7 +230,7 @@ static inline void vgic_arch_setup(const struct vgic_params *vgic)
int kvm_perf_init(void); int kvm_perf_init(void);
int kvm_perf_teardown(void); int kvm_perf_teardown(void);
static inline void kvm_arch_hardware_disable(void *garbage) {} static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}
......
...@@ -87,7 +87,7 @@ struct kvm_vcpu __percpu **kvm_get_running_vcpus(void) ...@@ -87,7 +87,7 @@ struct kvm_vcpu __percpu **kvm_get_running_vcpus(void)
return &kvm_arm_running_vcpu; return &kvm_arm_running_vcpu;
} }
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
return 0; return 0;
} }
......
...@@ -242,7 +242,7 @@ static inline void vgic_arch_setup(const struct vgic_params *vgic) ...@@ -242,7 +242,7 @@ static inline void vgic_arch_setup(const struct vgic_params *vgic)
} }
} }
static inline void kvm_arch_hardware_disable(void *garbage) {} static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}
......
...@@ -125,7 +125,7 @@ long ia64_pal_vp_create(u64 *vpd, u64 *host_iva, u64 *opt_handler) ...@@ -125,7 +125,7 @@ long ia64_pal_vp_create(u64 *vpd, u64 *host_iva, u64 *opt_handler)
static DEFINE_SPINLOCK(vp_lock); static DEFINE_SPINLOCK(vp_lock);
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
long status; long status;
long tmp_base; long tmp_base;
...@@ -160,7 +160,7 @@ int kvm_arch_hardware_enable(void *garbage) ...@@ -160,7 +160,7 @@ int kvm_arch_hardware_enable(void *garbage)
return 0; return 0;
} }
void kvm_arch_hardware_disable(void *garbage) void kvm_arch_hardware_disable(void)
{ {
long status; long status;
......
...@@ -762,7 +762,7 @@ extern int kvm_mips_trans_mtc0(uint32_t inst, uint32_t *opc, ...@@ -762,7 +762,7 @@ extern int kvm_mips_trans_mtc0(uint32_t inst, uint32_t *opc,
extern void kvm_mips_dump_stats(struct kvm_vcpu *vcpu); extern void kvm_mips_dump_stats(struct kvm_vcpu *vcpu);
extern unsigned long kvm_mips_get_ramsize(struct kvm *kvm); extern unsigned long kvm_mips_get_ramsize(struct kvm *kvm);
static inline void kvm_arch_hardware_disable(void *garbage) {} static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_free_memslot(struct kvm *kvm, static inline void kvm_arch_free_memslot(struct kvm *kvm,
......
...@@ -77,7 +77,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) ...@@ -77,7 +77,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
return 1; return 1;
} }
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
return 0; return 0;
} }
......
...@@ -682,7 +682,7 @@ struct kvm_vcpu_arch { ...@@ -682,7 +682,7 @@ struct kvm_vcpu_arch {
#define __KVM_HAVE_ARCH_WQP #define __KVM_HAVE_ARCH_WQP
#define __KVM_HAVE_CREATE_DEVICE #define __KVM_HAVE_CREATE_DEVICE
static inline void kvm_arch_hardware_disable(void *garbage) {} static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_memslots_updated(struct kvm *kvm) {} static inline void kvm_arch_memslots_updated(struct kvm *kvm) {}
......
...@@ -384,7 +384,7 @@ int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, ...@@ -384,7 +384,7 @@ int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr,
} }
EXPORT_SYMBOL_GPL(kvmppc_ld); EXPORT_SYMBOL_GPL(kvmppc_ld);
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
return 0; return 0;
} }
......
...@@ -452,7 +452,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu, ...@@ -452,7 +452,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu,
extern int sie64a(struct kvm_s390_sie_block *, u64 *); extern int sie64a(struct kvm_s390_sie_block *, u64 *);
extern char sie_exit; extern char sie_exit;
static inline void kvm_arch_hardware_disable(void *garbage) {} static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_check_processor_compat(void *rtn) {} static inline void kvm_arch_check_processor_compat(void *rtn) {}
static inline void kvm_arch_exit(void) {} static inline void kvm_arch_exit(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {}
......
...@@ -100,7 +100,7 @@ int test_vfacility(unsigned long nr) ...@@ -100,7 +100,7 @@ int test_vfacility(unsigned long nr)
} }
/* Section: not file related */ /* Section: not file related */
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
/* every s390 is virtualization enabled ;-) */ /* every s390 is virtualization enabled ;-) */
return 0; return 0;
......
...@@ -661,8 +661,8 @@ struct msr_data { ...@@ -661,8 +661,8 @@ struct msr_data {
struct kvm_x86_ops { struct kvm_x86_ops {
int (*cpu_has_kvm_support)(void); /* __init */ int (*cpu_has_kvm_support)(void); /* __init */
int (*disabled_by_bios)(void); /* __init */ int (*disabled_by_bios)(void); /* __init */
int (*hardware_enable)(void *dummy); int (*hardware_enable)(void);
void (*hardware_disable)(void *dummy); void (*hardware_disable)(void);
void (*check_processor_compatibility)(void *rtn); void (*check_processor_compatibility)(void *rtn);
int (*hardware_setup)(void); /* __init */ int (*hardware_setup)(void); /* __init */
void (*hardware_unsetup)(void); /* __exit */ void (*hardware_unsetup)(void); /* __exit */
......
...@@ -622,7 +622,7 @@ static int has_svm(void) ...@@ -622,7 +622,7 @@ static int has_svm(void)
return 1; return 1;
} }
static void svm_hardware_disable(void *garbage) static void svm_hardware_disable(void)
{ {
/* Make sure we clean up behind us */ /* Make sure we clean up behind us */
if (static_cpu_has(X86_FEATURE_TSCRATEMSR)) if (static_cpu_has(X86_FEATURE_TSCRATEMSR))
...@@ -633,7 +633,7 @@ static void svm_hardware_disable(void *garbage) ...@@ -633,7 +633,7 @@ static void svm_hardware_disable(void *garbage)
amd_pmu_disable_virt(); amd_pmu_disable_virt();
} }
static int svm_hardware_enable(void *garbage) static int svm_hardware_enable(void)
{ {
struct svm_cpu_data *sd; struct svm_cpu_data *sd;
......
...@@ -2728,7 +2728,7 @@ static void kvm_cpu_vmxon(u64 addr) ...@@ -2728,7 +2728,7 @@ static void kvm_cpu_vmxon(u64 addr)
: "memory", "cc"); : "memory", "cc");
} }
static int hardware_enable(void *garbage) static int hardware_enable(void)
{ {
int cpu = raw_smp_processor_id(); int cpu = raw_smp_processor_id();
u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
...@@ -2792,7 +2792,7 @@ static void kvm_cpu_vmxoff(void) ...@@ -2792,7 +2792,7 @@ static void kvm_cpu_vmxoff(void)
asm volatile (__ex(ASM_VMX_VMXOFF) : : : "cc"); asm volatile (__ex(ASM_VMX_VMXOFF) : : : "cc");
} }
static void hardware_disable(void *garbage) static void hardware_disable(void)
{ {
if (vmm_exclusive) { if (vmm_exclusive) {
vmclear_local_loaded_vmcss(); vmclear_local_loaded_vmcss();
......
...@@ -246,7 +246,7 @@ void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask) ...@@ -246,7 +246,7 @@ void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask)
} }
EXPORT_SYMBOL_GPL(kvm_set_shared_msr); EXPORT_SYMBOL_GPL(kvm_set_shared_msr);
static void drop_user_return_notifiers(void *ignore) static void drop_user_return_notifiers(void)
{ {
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu); struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
...@@ -6959,7 +6959,7 @@ void kvm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, unsigned int vector) ...@@ -6959,7 +6959,7 @@ void kvm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, unsigned int vector)
kvm_rip_write(vcpu, 0); kvm_rip_write(vcpu, 0);
} }
int kvm_arch_hardware_enable(void *garbage) int kvm_arch_hardware_enable(void)
{ {
struct kvm *kvm; struct kvm *kvm;
struct kvm_vcpu *vcpu; struct kvm_vcpu *vcpu;
...@@ -6970,7 +6970,7 @@ int kvm_arch_hardware_enable(void *garbage) ...@@ -6970,7 +6970,7 @@ int kvm_arch_hardware_enable(void *garbage)
bool stable, backwards_tsc = false; bool stable, backwards_tsc = false;
kvm_shared_msr_cpu_online(); kvm_shared_msr_cpu_online();
ret = kvm_x86_ops->hardware_enable(garbage); ret = kvm_x86_ops->hardware_enable();
if (ret != 0) if (ret != 0)
return ret; return ret;
...@@ -7051,10 +7051,10 @@ int kvm_arch_hardware_enable(void *garbage) ...@@ -7051,10 +7051,10 @@ int kvm_arch_hardware_enable(void *garbage)
return 0; return 0;
} }
void kvm_arch_hardware_disable(void *garbage) void kvm_arch_hardware_disable(void)
{ {
kvm_x86_ops->hardware_disable(garbage); kvm_x86_ops->hardware_disable();
drop_user_return_notifiers(garbage); drop_user_return_notifiers();
} }
int kvm_arch_hardware_setup(void) int kvm_arch_hardware_setup(void)
......
...@@ -630,8 +630,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); ...@@ -630,8 +630,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);
int kvm_arch_hardware_enable(void *garbage); int kvm_arch_hardware_enable(void);
void kvm_arch_hardware_disable(void *garbage); void kvm_arch_hardware_disable(void);
int kvm_arch_hardware_setup(void); int kvm_arch_hardware_setup(void);
void kvm_arch_hardware_unsetup(void); void kvm_arch_hardware_unsetup(void);
void kvm_arch_check_processor_compat(void *rtn); void kvm_arch_check_processor_compat(void *rtn);
......
...@@ -2669,7 +2669,7 @@ static void hardware_enable_nolock(void *junk) ...@@ -2669,7 +2669,7 @@ static void hardware_enable_nolock(void *junk)
cpumask_set_cpu(cpu, cpus_hardware_enabled); cpumask_set_cpu(cpu, cpus_hardware_enabled);
r = kvm_arch_hardware_enable(NULL); r = kvm_arch_hardware_enable();
if (r) { if (r) {
cpumask_clear_cpu(cpu, cpus_hardware_enabled); cpumask_clear_cpu(cpu, cpus_hardware_enabled);
...@@ -2694,7 +2694,7 @@ static void hardware_disable_nolock(void *junk) ...@@ -2694,7 +2694,7 @@ static void hardware_disable_nolock(void *junk)
if (!cpumask_test_cpu(cpu, cpus_hardware_enabled)) if (!cpumask_test_cpu(cpu, cpus_hardware_enabled))
return; return;
cpumask_clear_cpu(cpu, cpus_hardware_enabled); cpumask_clear_cpu(cpu, cpus_hardware_enabled);
kvm_arch_hardware_disable(NULL); kvm_arch_hardware_disable();
} }
static void hardware_disable(void) static void hardware_disable(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment