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: <b8da66c19ca98db6f836bd82e3e0ffa541f4dd90.camel@intel.com>
Date:   Mon, 14 Aug 2023 06:42:06 +0000
From:   "Zhang, Rui" <rui.zhang@...el.com>
To:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "Gross, Jurgen" <jgross@...e.com>,
        "mikelley@...rosoft.com" <mikelley@...rosoft.com>,
        "arjan@...ux.intel.com" <arjan@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "ray.huang@....com" <ray.huang@....com>,
        "andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
        "Sivanich, Dimitri" <dimitri.sivanich@....com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>
Subject: Re: [patch V3 23/40] x86/cpu: Provide cpu_init/parse_topology()

On Mon, 2023-08-14 at 08:20 +0200, Thomas Gleixner wrote:
> On Sun, Aug 13 2023 at 16:36, Thomas Gleixner wrote:
> > On Sun, Aug 13 2023 at 13:30, Rui Zhang wrote:
> > > > My understanding is that, to ensure a package scope unique
> > > > core_id,
> > > > rather than Module/Tile scope unique, what is really needed
> > > > here is
> > > > something like,
> > > > > 
> > > >         apicid >>= x86_topo_system.dom_shifts[SMT];
> > > >         c->topo.core_id = apicid &
> > > > (x86_topo_system.dom_size[PACKAGE]
> > > > - 1);
> 
> Actually it needs to be:
> 
>          apicid &= (1U <<
> x86_topo_system.dom_shifts[TOPO_PKG_DOMAIN]) - 1;
>          c->topo.core_id = apicid >>
> x86_topo_system.dom_shifts[TOPO_SMT_DOMAIN];
> 
> because otherwise you shift the lowest package ID bit into the
> result.

Agreed.

thanks,
rui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ