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>] [day] [month] [year] [list]
Message-ID: <7112264.IUdZzFR1Qm@aspire.rjw.lan>
Date:   Thu, 29 Mar 2018 13:03:35 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     David Wang <DavidWang@...oxin.com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        "len.brown@...el.com" <len.brown@...el.com>,
        "pavel@....cz" <pavel@....cz>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
        "linux-pm@...nel.org" <linux-pm@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Bruce Chang (VAS)" <BruceChang@...-alliance.com>,
        "Cooper Yan(BJ-RD)" <CooperYan@...oxin.com>,
        "Qiyuan Wang(BJ-RD)" <QiyuanWang@...oxin.com>,
        Benjamin Pan <BenjaminPan@...tech.com>,
        Luke Lin <LukeLin@...cpu.com>,
        "Tim Guo(BJ-RD)" <TimGuo@...oxin.com>,
        "Cobe Chen(BJ-RD)" <CobeChen@...oxin.com>,
        "Jiangbo Wang(BJ-RD)" <JiangboWang@...oxin.com>
Subject: Re: 答复: 答复: [PATCH] Delete some unusefull operations for centaur CPU/platform

On Wednesday, March 28, 2018 11:21:15 AM CEST David Wang wrote:
> Dear Rafael,
> 
> After disscusion with engineer from Centaur,   the orginal patch maybe not safe for some older Centaur CPU/platform. So, I want to use another patch like the following:

OK

I will drop the previous one, no problem.

Please resumbit the new one on top of the Linus' tree.

Thanks!

> diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> index 6c74dec..d92a7f3 100644
> --- a/arch/x86/kernel/acpi/cstate.c
> +++ b/arch/x86/kernel/acpi/cstate.c
> @@ -52,17 +52,15 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
>             (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f)))
>                         flags->bm_control = 0;
> 
> -        if (c->x86_vendor == X86_VENDOR_CENTAUR) {
> -               /*
> -                * On all Centaur CPUs, software need not flush the CPU caches
> -                * when entering C3-type C-states.
> -                *
> -                * On all Centaur platforms, software need not disable bus
> -                * master arbitration when entering C3-type C-states.
> -                */
> -               flags->bm_check = 1;
> -               flags->bm_control = 0;
> -       }
> +       /*
> +        * For all recent Centaur CPUs, the ucode will make sure that each core can keep
> +        * cache coherence with each other while entering C3 type state.
> +        * So, set bm_check to 1 to indicate that the kernel need not execute a cache
> +        * flush operation (WBINVD) when entering C3 type state.
> +        */
> +       if (c->x86_vendor == X86_VENDOR_CENTAUR &&
> +           (c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0x0f && c->x86_mask>=0x0e)))
> +                       flags->bm_check = 1;
>  }
>  EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
> 
> Can you help to drop the orignal patch you queued up to the linux-next?
> Thank you.
> 
> 
> David
> 
> ________________________________
> 发件人: Ingo Molnar <mingo.kernel.org@...il.com> 代表 Ingo Molnar <mingo@...nel.org>
> 发送时间: 2018年3月12日 17:46:09
> 收件人: Rafael J. Wysocki
> 抄送: David Wang; len.brown@...el.com; pavel@....cz; tglx@...utronix.de; mingo@...hat.com; hpa@...or.com; x86@...nel.org; linux-pm@...nel.org; linux-kernel@...r.kernel.org; Bruce Chang (VAS); Cooper Yan(BJ-RD); Qiyuan Wang(BJ-RD); Benjamin Pan; Luke Lin; Tim Guo(BJ-RD); Cobe Chen(BJ-RD); Jiangbo Wang(BJ-RD)
> 主题: Re: 答复: [PATCH] Delete some unusefull operations for centaur CPU/platform
> 
> 
> * Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> 
> > On Monday, March 12, 2018 9:40:33 AM CET Ingo Molnar wrote:
> > >
> > > * David Wang <DavidWang@...oxin.com> wrote:
> > >
> > > > [David] pr->flags.has_cst means BIOS define valid C state table.  And at lease
> > > > define 2 entries. On all centaur platform which support C3, this condition is
> > > > always true.
> > >
> > > > [David] Just as the following comment said, we need not execute WBINVD and
> > > > ARB_DISABLE/ARB_ENABLE when entering C3 if bm_check=1 and bm_control=0.  This
> > > > logic is valid for all platform not only for Centaur, I think.
> > >
> > > Ok, fair enough!
> >
> > Well, I still have this one queued up as cpuidle material.
> >
> > I can drop it if you want to take it instead.
> 
> No need to drop it, it looks good to me!
> 
> Thanks,
> 
>         Ingo
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ