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 Feb 2022 12:25:43 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jim Mattson <jmattson@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Tony Luck <tony.luck@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Chang S. Bae" <chang.seok.bae@...el.com>,
        Juergen Gross <jgross@...e.com>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Babu Moger <babu.moger@....com>,
        Jing Liu <jing2.liu@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86/cpufeatures: Add macros for Intel's new fast rep
 string features

On 2/3/22 11:43, Jim Mattson wrote:
> Even if no one else cares, these features should be exposed to kvm
> guests, and the code for the KVM_GET_SUPPORTED_CPUID ioctl is more
> readable if the bits have corresponding X86_FEATURE macros.

I went digging around KVM_GET_SUPPORTED_CPUID and didn't see any obvious
unreadable things resulting from not having these defines.  Maybe I'm
looking in the wrong spot.  Do you have a slightly more specific pointer?

> +#define X86_FEATURE_FZRM		(12*32+10) /* Fast zero-length REP MOVSB */
> +#define X86_FEATURE_FSRS		(12*32+11) /* Fast short REP STOSB */
> +#define X86_FEATURE_FSRC		(12*32+12) /* Fast short REP {CMPSB,SCASB} */

If the use really is for inside the kernel, maybe we should hide them
from cpuinfo:

#define X86_FEATURE_FSRC		(12*32+12) /* "" Fast short REP {CMPSB,SCASB} */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ