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: <ec121630-1ee5-1336-1ed4-04506f0c4129@intel.com>
Date:   Thu, 23 Jun 2022 08:55:42 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Tony W Wang-oc <TonyWWang-oc@...oxin.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        the arch/x86 maintainers <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc:     CobeChen@...oxin.com, TimGuo@...oxin.com, LindaChai@...oxin.com,
        LeoLiu@...oxin.com,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH V1] x86/cstate: Add Zhaoxin/Centaur ACPI Cx FFH MWAIT
 support

On 6/22/22 18:26, Tony W Wang-oc wrote:
> Recent Zhaoxin/Centaur CPUs support X86_FEATURE_MWAIT that implies
> the MONITOR/MWAIT instructions can be used for ACPI Cx state.
> The BIOS declares Cx state in _CST object to use FFH on Zhaoxin/Centaur
> systems. So let function ffh_cstate_init() support These CPUs too.
> 
> Signed-off-by: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
> ---
>  arch/x86/kernel/acpi/cstate.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> index 7945eae..d4185e1 100644
> --- a/arch/x86/kernel/acpi/cstate.c
> +++ b/arch/x86/kernel/acpi/cstate.c
> @@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void)
> 
>      if (c->x86_vendor != X86_VENDOR_INTEL &&
>          c->x86_vendor != X86_VENDOR_AMD &&
> -        c->x86_vendor != X86_VENDOR_HYGON)
> +        c->x86_vendor != X86_VENDOR_HYGON &&
> +        c->x86_vendor != X86_VENDOR_CENTAUR &&
> +        c->x86_vendor != X86_VENDOR_ZHAOXIN)
>          return -1;

Many of the changelogs that add new vendors here go on about particular
C states declared in the _CST object and contents of CPUID leaf 5.

Why do we even _have_ a vendor check here?  Shouldn't the code just be
going and doing the validation of the _CST object and CPUID that the
changelogs blather on about?

Intel certainly made the original sin on this one (see 991528d7348), but
I hope _something_ changed in the 16 years since that patch went in.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ