Re: [PATCH v2 3/4] Add support for AMD Core Perf Extension in guest

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

 



On Thu, Nov 16, 2017 at 12:00:11PM -0600, Natarajan, Janakarajan wrote:
> Ah my apologies. So when the pmu is initialized the cpuid entries
> aren't available then.

So let's see:

... kvm_arch_vcpu_create() ->
svm_create_vcpu() ->
kvm_vcpu_init() ->
kvm_arch_vcpu_init() ->

<--- HERE

kvm_pmu_init()

But at HERE in kvm_arch_vcpu_init() right before kvm_pmu_init() we do already query
cpuid:

	vcpu->arch.maxphyaddr = cpuid_query_maxphyaddr(vcpu);

so it's not like we don't know about cpuid leafs at that point. Which
would mean that the code can be made to set the CPU family earlier,
before kvm_pmu_init() runs so that you have the proper CPU family and
thus have this thing properly designed.

Maybe Paolo and Radim have a better suggestion here...

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 



[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