2015-04-08 12:18-0400, Wei Huang: > +/* Called before using any PMU functions above */ > +int kvm_pmu_arch_init(struct kvm_x86_ops *x86_ops) > +{ > + kvm_pmu_ops = x86_ops->get_pmu_ops(); > + > + if (x86_ops && (kvm_pmu_ops = x86_ops->get_pmu_ops()) != NULL) > + return 0; > + else > + return -EINVAL; > +} > @@ -5782,6 +5783,9 @@ int kvm_arch_init(void *opaque) > > kvm_timer_init(); > > + /* init pointers of PMU operations */ > + kvm_pmu_arch_init(ops); I missed this yesterday ... the return value isn't used, so we could check and return here, or save all the complexity in kvm_pmu_arch_init() when we are going to BUG anyway. (Also, the comment misalignment is caused by indentation using spaces.) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html