Skip to content

Commit

Permalink
KVM: Drop kvm_arch_vcpu_setup()
Browse files Browse the repository at this point in the history
Remove kvm_arch_vcpu_setup() now that all arch specific implementations
are nops.

Acked-by: Christoffer Dall <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Sean Christopherson authored and bonzini committed Jan 27, 2020
1 parent b3d42c9 commit afede96
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 41 deletions.
5 changes: 0 additions & 5 deletions arch/arm/kvm/guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ NULL }
};

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

static u64 core_reg_offset_from_id(u64 id)
{
return id & ~(KVM_REG_ARCH_MASK | KVM_REG_SIZE_MASK | KVM_REG_ARM_CORE);
Expand Down
5 changes: 0 additions & 5 deletions arch/arm64/kvm/guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ NULL }
};

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

static bool core_reg_offset_is_vreg(u64 off)
{
return off >= KVM_REG_ARM_CORE_REG(fp_regs.vregs) &&
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/kvm/mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,11 +1244,6 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
return 0;
}

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

static void kvm_mips_set_c0_status(void)
{
u32 status = read_c0_status();
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/kvm/book3s.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,6 @@ int kvmppc_load_last_inst(struct kvm_vcpu *vcpu,
}
EXPORT_SYMBOL_GPL(kvmppc_load_last_inst);

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu)
{
return 0;
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,11 +1377,6 @@ static void kvmppc_set_tsr(struct kvm_vcpu *vcpu, u32 new_tsr)
update_timer_ints(vcpu);
}

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu)
{
/* setup watchdog timer once */
Expand Down
5 changes: 0 additions & 5 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -2931,11 +2931,6 @@ static void kvm_s390_vcpu_setup_model(struct kvm_vcpu *vcpu)
vcpu->arch.sie_block->fac = (u32)(u64) model->fac_list;
}

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

static int kvm_s390_vcpu_setup(struct kvm_vcpu *vcpu)
{
int rc = 0;
Expand Down
5 changes: 0 additions & 5 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -9197,11 +9197,6 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
return 0;
}

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
return 0;
}

void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
{
struct msr_data msr;
Expand Down
1 change: 0 additions & 1 deletion include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ 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);
int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu);
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);

Expand Down
5 changes: 0 additions & 5 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2753,10 +2753,6 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
if (r)
goto vcpu_uninit;

r = kvm_arch_vcpu_setup(vcpu);
if (r)
goto vcpu_destroy;

kvm_create_vcpu_debugfs(vcpu);

mutex_lock(&kvm->lock);
Expand Down Expand Up @@ -2792,7 +2788,6 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
unlock_vcpu_destroy:
mutex_unlock(&kvm->lock);
debugfs_remove_recursive(vcpu->debugfs_dentry);
vcpu_destroy:
kvm_arch_vcpu_destroy(vcpu);
vcpu_uninit:
kvm_vcpu_uninit(vcpu);
Expand Down

0 comments on commit afede96

Please sign in to comment.