KVM: x86: move kvm_create_vcpu_debugfs after last failure point
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 31 Mar 2020 22:42:22 +0000 (00:42 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Apr 2020 13:13:00 +0000 (09:13 -0400)
commit63d04348371b7ea4a134bcf47c79763d969e9168
treee8ffd45d636fc2fca1bfeaaf2487172639dc3ac2
parent1c164cb3ffd084e5359a56abde715acf121e69a4
KVM: x86: move kvm_create_vcpu_debugfs after last failure point

The placement of kvm_create_vcpu_debugfs is more or less irrelevant, since
it cannot fail and userspace should not care about the debugfs entries until
it knows the vcpu has been created.  Moving it after the last failure
point removes the need to remove the directory when unwinding the creation.

Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20200331224222.393439-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c