History

KVM: Move vcpu alloc and init invocation to common code

Now that all architectures tightly couple vcpu allocation/free with the mandatory calls to kvm_{un}init_vcpu(), move the sequences verbatim to common KVM code. Move both allocation and initialization in a single patch to eliminate thrash in arch specific code. The bisection benefits of moving the two pieces in separate patches is marginal at best, whereas the odds of introducing a transient arch specific bug are non-zero.

Sean Christopherson committed 6 years ago

Commit e529ef61 parent 4543bdc7 files · +43 −138Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/kvm_host.h+1−1
@@ -876,7 +876,7 @@ void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu); · 875 unmodified lines
876void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);876void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
877void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);877void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
878int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id);878int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id);
879struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id);879int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu);
880int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);880int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
881void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);881void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);
882void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);882void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);