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] [day] [month] [year] [list]
Message-ID: <e9525e3c-f0e6-e9ed-6ce5-fc207742c9d4@amd.com>
Date:   Sat, 11 Sep 2021 10:12:28 +0530
From:   Ravi Bangoria <ravi.bangoria@....com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...hat.com, yao.jin@...ux.intel.com, namhyung@...nel.org,
        kim.phillips@....com, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH 2/2] perf annotate: Add fusion logic for AMD microarchs



On 10-Sep-21 7:49 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Sep 10, 2021 at 04:47:31PM +0530, Ravi Bangoria escreveu:
>>
>>>> +static bool x86__ins_is_fused(struct arch *arch, const char *ins1,
>>>> +			      const char *ins2)
>>>> +{
>>>> +	if (strstarts(arch->vendor, "AuthenticAMD"))
>>>> +		return amd__ins_is_fused(arch, ins1, ins2);
>>>> +
>>>> +	return intel__ins_is_fused(arch, ins1, ins2);
>>>> +}
>>>> +
>>>
>>> Can we instead make x86__ins_is_fused be a pointer and instead of
>>> storing arch->vendor we set it to one of amd__ins_is_fused() or
>>> intel__ins_is_fused()?
>>>
>>> I.e. here:
>>>
>>>>  static int x86__cpuid_parse(struct arch *arch, char *cpuid)
>>>>  {
>>>>  	unsigned int family, model, stepping;
>>>> @@ -184,6 +216,9 @@ static int x86__cpuid_parse(struct arch *arch, char *cpuid)
>>>>  	if (ret == 3) {
>>>>  		arch->family = family;
>>>>  		arch->model = model;
>>>> +		arch->vendor = strndup(cpuid, 12);
>>>
>>> 		x86__ins_is_fused = strstarts(cpuid, "AuthenticAMD") ?
>>> 					amd__ins_is_fused :
>>> 					intel__ins_is_fused;
>>
>> Sure. Will post v2.
> 
> Thanks, if you're quick we may get this into this merge window :-)

v2 Posted: https://lore.kernel.org/lkml/20210911043854.8373-1-ravi.bangoria@amd.com

Thanks,
Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ