KVM: Drop kvm_arch_vcpu_setup()
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 18 Dec 2019 21:55:22 +0000 (13:55 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Jan 2020 18:59:28 +0000 (19:59 +0100)
Remove kvm_arch_vcpu_setup() now that all arch specific implementations
are nops.

Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/arm/kvm/guest.c
arch/arm64/kvm/guest.c
arch/mips/kvm/mips.c
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/booke.c
arch/s390/kvm/kvm-s390.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c

index 0e6f23504c26be866e4b72a4016cdaadabbd208b..9f7ae0d8690f90c0c4f6b217d8734e5d29392d81 100644 (file)
@@ -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);
index 2fff06114a8f5ccbcbb27330437f02ca443bebcd..2bd92301d32f4b094777adf1c0add55e44f54347 100644 (file)
@@ -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) &&
index b3a4435af66b1363428819b79ddda7a17d278c2b..06366e2415a6ab5b74901bb3de5197dd6aecbddb 100644 (file)
@@ -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();
index 3f7adcb0ff63c22f6884f518401949fca922f62e..d07a8e12fa15649def7c790e9873782bbb20e2d4 100644 (file)
@@ -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;
index e291c62187fe307e967b63217d2512249eb1f5f7..9cb8257b41187f48cccf9e2983013a6bde55657a 100644 (file)
@@ -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 */
index dca3d6aac2bb4ea7dc7764e0bb9a3b1bb861fd0e..a1bb47c7ba1e31440400225d38d26ef26adce81c 100644 (file)
@@ -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;
index e4a446990306917666bc09db34ce6abc48b33043..827d5fcba7a5cbc5424ecff5a7c3ba23db7b91a9 100644 (file)
@@ -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;
index 521f17cd2b2600814befdb2c2d7236f34f1f2e48..87ca40f62b06aa3aa34665605623e70bb509ebab 100644 (file)
@@ -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);
 
index 1ddb6d4cfbfd0bc663568015b63e2406c7e9818b..8e9d24442d20782df5805daf8f7f5158cabfa217 100644 (file)
@@ -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);
@@ -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);