Re: [PATCH 3/3] KVM: x86/pmu: Segregate Intel and AMD specific logic

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

 




On 21-Feb-22 1:27 PM, Like Xu wrote:
> On 21/2/2022 3:31 pm, Ravi Bangoria wrote:
>>   void reprogram_counter(struct kvm_pmu *pmu, int pmc_idx)
>>   {
>>       struct kvm_pmc *pmc = kvm_x86_ops.pmu_ops->pmc_idx_to_pmc(pmu, pmc_idx);
>> +    bool is_intel = !strncmp(kvm_x86_ops.name, "kvm_intel", 9);
> 
> How about using guest_cpuid_is_intel(vcpu)

Yeah, that's better then strncmp().

> directly in the reprogram_gp_counter() ?

We need this flag in reprogram_fixed_counter() as well.

- Ravi



[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