Re: [PATCH V4 2/4] KVM: x86/vPMU: Create vPMU interface for VMX and SVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/10/2015 05:12 AM, Joerg Roedel wrote:
> On Fri, Jun 05, 2015 at 01:20:14AM -0400, Wei Huang wrote:
>> +
>> +	struct kvm_pmu_ops *(*get_pmu_ops)(void);
> 
> Can't you just set kvm_pmu_ops in svm.c and vmx.c and save this
> call-back? Besides that the patch looks good.
Hi Joerg,

Thanks for your review. How about setting up kvm_pmu_ops in
.hardware_setup function of VMX and SVM? More specifically:

1) EXPORT_SYMBOL_GPL(kvm_pmu_ops) from pmu.c file;
2) In vmx.c, set "kvm_pmu_ops = &intel_pmu_ops" in hardware_setup();
3) In svm.c, set "kvm_pmu_ops = &amd_pmu_ops" in svm_hardware_setup().

With that, we can get rid of the call-back.

Thanks,
-Wei


> 
> 
> 	Joerg
> 
--
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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux