diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2019-12-18 13:55:28 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-27 19:59:33 +0100 |
commit | ddd259c9aaba08244dba8877687ee856f79c4f45 (patch) | |
tree | 3079be7a29714ba4b9928304a211538b734dbb02 /virt | |
parent | 19bcc89eb8a9fa1d4be4bff5b5e7917cb8bbc1f7 (diff) | |
download | linux-stable-ddd259c9aaba08244dba8877687ee856f79c4f45.tar.gz linux-stable-ddd259c9aaba08244dba8877687ee856f79c4f45.tar.bz2 linux-stable-ddd259c9aaba08244dba8877687ee856f79c4f45.zip |
KVM: Drop kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit()
Remove kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit() 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>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/arm.c | 5 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 16 |
2 files changed, 2 insertions, 19 deletions
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 937b4c7fb5be..1cfc108eca1e 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -360,11 +360,6 @@ void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) preempt_enable(); } -int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) -{ - return 0; -} - void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { int *last_ran; diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 8e9d24442d20..6b496038cd7f 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -324,7 +324,6 @@ void kvm_reload_remote_mmus(struct kvm *kvm) static int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) { struct page *page; - int r; mutex_init(&vcpu->mutex); vcpu->cpu = -1; @@ -338,10 +337,8 @@ static int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) INIT_LIST_HEAD(&vcpu->blocked_vcpu_list); page = alloc_page(GFP_KERNEL | __GFP_ZERO); - if (!page) { - r = -ENOMEM; - goto fail; - } + if (!page) + return -ENOMEM; vcpu->run = page_address(page); kvm_vcpu_set_in_spin_loop(vcpu, false); @@ -350,15 +347,7 @@ static int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) vcpu->ready = false; preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops); - r = kvm_arch_vcpu_init(vcpu); - if (r < 0) - goto fail_free_run; return 0; - -fail_free_run: - free_page((unsigned long)vcpu->run); -fail: - return r; } static void kvm_vcpu_uninit(struct kvm_vcpu *vcpu) @@ -369,7 +358,6 @@ static void kvm_vcpu_uninit(struct kvm_vcpu *vcpu) * descriptors are already gone. */ put_pid(rcu_dereference_protected(vcpu->pid, 1)); - kvm_arch_vcpu_uninit(vcpu); free_page((unsigned long)vcpu->run); } |