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.
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -876,7 +876,7 @@ void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu); · 875 unmodified lines | ||
| 876 | 876 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu); |
| 877 | 877 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); |
| 878 | 878 | int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id); |
| 879 | −struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id); | |
| 879 | +int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu); | |
| 880 | 880 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); |
| 881 | 881 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); |
| 882 | 882 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |