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]
Date:   Thu, 3 Nov 2022 10:35:04 +0800
From:   Jiaxi Chen <jiaxi.chen@...ux.intel.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Borislav Petkov <bp@...en8.de>, kvm@...r.kernel.org,
        tglx@...utronix.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, pbonzini@...hat.com,
        ndesaulniers@...gle.com, alexandre.belloni@...tlin.com,
        peterz@...radead.org, jpoimboe@...nel.org,
        chang.seok.bae@...el.com, pawan.kumar.gupta@...ux.intel.com,
        babu.moger@....com, jmattson@...gle.com, sandipan.das@....com,
        tony.luck@...el.com, sathyanarayanan.kuppuswamy@...ux.intel.com,
        fenghua.yu@...el.com, keescook@...omium.org,
        jane.malalane@...rix.com, nathan@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] x86: KVM: Enable CMPccXADD CPUID and expose it to
 guest


On 11/1/2022 11:07 PM, Sean Christopherson wrote:
> On Tue, Nov 01, 2022, Jiaxi Chen wrote:
>>
>>
>> On 10/27/2022 1:15 AM, Borislav Petkov wrote:
>>> On Wed, Oct 26, 2022 at 11:40:31AM +0800, Jiaxi Chen wrote:
>>>>> What do you think about moving CPUID_7_1_EAX to be a KVM-only leaf too?  AFAICT,
>>>>> KVM passthrough is the only reason the existing features are defined.
>>>
>>> Yap, looking at the patches which added those 2 feature flags upstream,
>>> they don't look like some particular use was the goal but rather to
>>> expose it to guests. Besides, AVX512 apps do their own CPUID detection.
>>>
>>>> Since CPUID_7_1_EAX has only 5 features now, it is a big waste,       
>>>> should we move it to KVM-only leaf as Sean suggested. What's your     
>>>> opinion about this?                                                   
>>>
>>> Yes, pls do.
>>>
>>> And when you do, make sure to undo what
>>>
>>>   b302e4b176d0 ("x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions")
>>>
>>> added.
>>>
>>> Thx.
>>>
>> Hi Sean and Boris,
>>
>> Just realized moving CPUID_7_1_EAX to kvm-only leaf will not save space
>> in enum cpuid_leafs[]. CPUID_7_1_EAX is indeed removed, but someone
>> else, ie. CPUID_DUMMY needs to take the place, otherwise the cpuid_leafs
>> array would be deranged. Therefore, the length of x86 cpuid leaves is
>> not decreased.
> 
> The order of "enum cpuid_leafs" is completely arbitrary.
> 
> After replacing CPUID_7_1_EAX with CPUID_DUMMY, replace CPUID_DUMMY with the last
> leaf, which is currently CPUID_8000_001F_EAX, and update the #defines accordingly.
> Alternatively, Boris may prefer skipping the intermediate CPUID_DUMMY step and
> just replace CPUID_7_1_EAX with CPUID_8000_001F_EAX straightaway.

Yes, thanks for Sean's kind suggestion. I think use CPUID_DUMMY as the
transition leaf will make the code logic and commit message clearer.
Will change it in v2.
-- 
Regards,
Jiaxi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ