lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80fce7df-d387-773d-ad7d-3540c2d411d1@amd.com>
Date:   Mon, 21 Feb 2022 15:31:49 +0530
From:   Ravi Bangoria <ravi.bangoria@....com>
To:     Like Xu <like.xu.linux@...il.com>
Cc:     seanjc@...gle.com, jmattson@...gle.com,
        dave.hansen@...ux.intel.com, peterz@...radead.org,
        alexander.shishkin@...ux.intel.com, eranian@...gle.com,
        daviddunn@...gle.com, ak@...ux.intel.com,
        kan.liang@...ux.intel.com, x86@...nel.org, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, kim.phillips@....com,
        santosh.shukla@....com,
        "Paolo Bonzini - Distinguished Engineer (kernel-recipes.org) (KVM HoF)" 
        <pbonzini@...hat.com>, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 3/3] KVM: x86/pmu: Segregate Intel and AMD specific logic



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ