[tip: perf/core] x86/cpufeatures: Enumerate Intel Hybrid Technology feature bit

2021-04-20 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the perf/core branch of tip: Commit-ID: a161545ab53b174c016b0eb63c289525d2f6 Gitweb: https://git.kernel.org/tip/a161545ab53b174c016b0eb63c289525d2f6 Author:Ricardo Neri AuthorDate:Mon, 12 Apr 2021 07:30:41 -07:00 Committer

[tip: perf/core] x86/cpu: Add helper function to get the type of the current hybrid CPU

2021-04-20 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the perf/core branch of tip: Commit-ID: 250b3c0d79d1f4a55e54d8a9ef48058660483fef Gitweb: https://git.kernel.org/tip/250b3c0d79d1f4a55e54d8a9ef48058660483fef Author:Ricardo Neri AuthorDate:Mon, 12 Apr 2021 07:30:42 -07:00 Committer

[PATCH v2 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-13 Thread Ricardo Neri
Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- Changes since v1: * Don't bailout in update_sd_pick_busiest() if dst_cpu cannot pull tasks. Instead, reclassify the candidate busiest group, as it may still

[PATCH v2 4/4] x86/sched: Enable checks of the state of SMT siblings in load balancing

2021-04-13 Thread Ricardo Neri
Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- Changes since v1: * None --- arch/x86/kernel/itmt.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/x86/kernel/itmt.c b/arch/x86

[PATCH v2 2/4] sched/fair: Introduce arch_sched_asym_prefer_early()

2021-04-13 Thread Ricardo Neri
Gorman Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- Changes since v1: * None --- include/linux/sched/topology.h | 1 + kernel/sched/fair.c| 11 ++- 2 files changed, 11 insertions

[PATCH v2 0/4] sched/fair: Fix load balancing of SMT siblings with ASYM_PACKING

2021-04-13 Thread Ricardo Neri
00 ( 0.00) normal mthread-81.00 ( 0.00) +0.00 ( 0.00) [1]. https://lore.kernel.org/lkml/20210406041108.7416-1-ricardo.neri-calde...@linux.intel.com/ Ricardo Neri (4): sched/fair: Optimize checking for group_asym_packing sched/fair: Introduce arch_sched_asym_prefer_ea

[PATCH v2 1/4] sched/fair: Optimize checking for group_asym_packing

2021-04-13 Thread Ricardo Neri
Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- Changes since v1: * None --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 04a3ce20da67..4ef3fa0d5e8d 100644 --- a/kernel

Re: [PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-08 Thread Ricardo Neri
On Thu, Apr 08, 2021 at 01:21:22PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 04:17:51PM -0700, Ricardo Neri wrote: > > On Tue, Apr 06, 2021 at 01:18:09PM +0200, Peter Zijlstra wrote: > > > On Mon, Apr 05, 2021 at 09:11:07PM -0700, Ricardo Neri wrote: &g

Re: [PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-08 Thread Ricardo Neri
On Thu, Apr 08, 2021 at 01:10:39PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 04:17:10PM -0700, Ricardo Neri wrote: > > On Tue, Apr 06, 2021 at 01:17:28PM +0200, Peter Zijlstra wrote: > > > On Mon, Apr 05, 2021 at 09:11:07PM -0700, Ricardo Neri wrote: > >

Re: [PATCH 2/4] sched/fair: Introduce arch_sched_asym_prefer_early()

2021-04-06 Thread Ricardo Neri
On Tue, Apr 06, 2021 at 04:31:35PM +0200, Vincent Guittot wrote: > On Tue, 6 Apr 2021 at 06:11, Ricardo Neri > wrote: > > > > Introduce arch_sched_asym_prefer_early() so that architectures with SMT > > can delay the decision to label a candidate busiest group a

Re: [PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-06 Thread Ricardo Neri
On Tue, Apr 06, 2021 at 01:18:09PM +0200, Peter Zijlstra wrote: > On Mon, Apr 05, 2021 at 09:11:07PM -0700, Ricardo Neri wrote: > > +static bool cpu_group_is_smt(int cpu, struct sched_group *sg) > > +{ > > +#ifdef CONFIG_SCHED_SMT > > + if (!static

Re: [PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-06 Thread Ricardo Neri
On Tue, Apr 06, 2021 at 01:17:28PM +0200, Peter Zijlstra wrote: > On Mon, Apr 05, 2021 at 09:11:07PM -0700, Ricardo Neri wrote: > > @@ -8507,6 +8619,10 @@ static bool update_sd_pick_busiest(struct lb_env > > *env, > > if (!sgs->sum_h_nr_running) >

[PATCH 4/4] x86/sched: Enable checks of the state of SMT siblings in load balancing

2021-04-05 Thread Ricardo Neri
Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- arch/x86/kernel/itmt.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index 1afbdd1dd777

[PATCH 2/4] sched/fair: Introduce arch_sched_asym_prefer_early()

2021-04-05 Thread Ricardo Neri
Gorman Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- include/linux/sched/topology.h | 1 + kernel/sched/fair.c| 11 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH 1/4] sched/fair: Optimize checking for group_asym_packing

2021-04-05 Thread Ricardo Neri
Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 04a3ce20da67..4ef3fa0d5e8d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched

[PATCH 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-04-05 Thread Ricardo Neri
Cc: Quentin Perret Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim Chen Reviewed-by: Len Brown Signed-off-by: Ricardo Neri --- include/linux/sched/topology.h | 1 + kernel/sched/fair.c| 122 + 2 files changed, 123 insertions(+) diff --git

[PATCH 0/4] sched/fair: Fix load balancing of SMT siblings with ASYM_PACKING

2021-04-05 Thread Ricardo Neri
read-41.00 ( 0.00) +0.00 ( 0.00) normal mthread-81.00 ( 3.05) -2.16 ( 2.99) Ricardo Neri (4): sched/fair: Optimize checking for group_asym_packing sched/fair: Introduce arch_sched_asym_prefer_early() sched/fair: Consider SMT in ASYM_PACKING load b

Re: [PATCH V2 1/25] x86/cpufeatures: Enumerate Intel Hybrid Technology feature bit

2021-03-10 Thread Ricardo Neri
On Wed, Mar 10, 2021 at 09:01:47PM +0100, Borislav Petkov wrote: > On Wed, Mar 10, 2021 at 11:46:44AM -0800, Ricardo Neri wrote: > > But this series provides the use case, right? Kan's patches handle PMU > > counters > > that may differ cross types of CPUs. In patch

Re: [PATCH V2 1/25] x86/cpufeatures: Enumerate Intel Hybrid Technology feature bit

2021-03-10 Thread Ricardo Neri
On Wed, Mar 10, 2021 at 05:53:58PM +0100, Borislav Petkov wrote: > On Wed, Mar 10, 2021 at 08:37:37AM -0800, kan.li...@linux.intel.com wrote: > > From: Ricardo Neri > > > > Add feature enumeration to identify a processor with Intel Hybrid > > Technology: one in which

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-07 Thread Ricardo Neri
On Wed, Oct 07, 2020 at 07:15:46AM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 06, 2020 at 08:14:47PM -0700, Ricardo Neri wrote: > > On Tue, Oct 06, 2020 at 09:37:44AM +0200, Greg Kroah-Hartman wrote: > > > On Mon, Oct 05, 2020 at 05:57:36PM -0700, Ricardo Neri wrote: >

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-06 Thread Ricardo Neri
On Tue, Oct 06, 2020 at 09:37:44AM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 05, 2020 at 05:57:36PM -0700, Ricardo Neri wrote: > > On Sat, Oct 03, 2020 at 10:53:45AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Oct 02, 2020 at 06:17:42PM -0700, Ricardo Neri wrote:

Re: [PATCH 0/4] drivers core: Introduce CPU type sysfs interface

2020-10-06 Thread Ricardo Neri
On Tue, Oct 06, 2020 at 09:51:53AM +0100, Qais Yousef wrote: > Hi Ricardo Hi Qais, Thanks for chiming in. > > Adding some people who might be interested. > > On 10/02/20 18:17, Ricardo Neri wrote: > > Hybrid CPU topologies combine processors with more than one type of &

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-05 Thread Ricardo Neri
On Fri, Oct 02, 2020 at 08:27:41PM -0700, Randy Dunlap wrote: > On 10/2/20 6:17 PM, Ricardo Neri wrote: > > +/** > > + * arch_get_cpu_type() - Get the CPU type number > > + * @cpu: Index of the CPU of which the index is needed > > + * > > + * Get the CPU type nu

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 01:05:48PM +0200, Greg Kroah-Hartman wrote: > On Sat, Oct 03, 2020 at 10:53:45AM +0200, Greg Kroah-Hartman wrote: > > On Fri, Oct 02, 2020 at 06:17:42PM -0700, Ricardo Neri wrote: > > > +/** > > > + * arch_get_cpu_type_name() - Get the CPU ty

Re: [PATCH 4/4] x86/cpu/topology: Implement the CPU type sysfs interface

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 10:55:06AM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 02, 2020 at 06:17:45PM -0700, Ricardo Neri wrote: > > Recent Intel processors combine CPUs with different types of micro- > > architecture in the same package. There may be applications interested

Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 10:53:45AM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 02, 2020 at 06:17:42PM -0700, Ricardo Neri wrote: > > Hybrid CPU topologies combine CPUs of different microarchitectures in the > > same die. Thus, even though the instruction set is compatible amo

Re: [PATCH 0/4] drivers core: Introduce CPU type sysfs interface

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 10:49:34AM +0200, Borislav Petkov wrote: > On Fri, Oct 02, 2020 at 06:17:41PM -0700, Ricardo Neri wrote: > > Patch 1 of the series proposes the generic interface, with hooks > > that architectures can override to suit their needs. The three patches > &

Re: [PATCH 0/3] x86: Add initial support to discover Intel hybrid CPUs

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 11:04:29AM +0200, Borislav Petkov wrote: > On Fri, Oct 02, 2020 at 07:17:30PM -0700, Luck, Tony wrote: > > On Sat, Oct 03, 2020 at 03:39:29AM +0200, Thomas Gleixner wrote: > > > On Fri, Oct 02 2020 at 13:19, Ricardo Neri wrote: > > > > Add sup

Re: [PATCH 0/3] x86: Add initial support to discover Intel hybrid CPUs

2020-10-05 Thread Ricardo Neri
On Sat, Oct 03, 2020 at 12:46:29PM +0200, Thomas Gleixner wrote: > On Fri, Oct 02 2020 at 19:17, Tony Luck wrote: > > > On Sat, Oct 03, 2020 at 03:39:29AM +0200, Thomas Gleixner wrote: > >> On Fri, Oct 02 2020 at 13:19, Ricardo Neri wrote: > >> > Add suppo

[PATCH 4/4] x86/cpu/topology: Implement the CPU type sysfs interface

2020-10-02 Thread Ricardo Neri
Tony Luck Suggested-by: Len Brown # Necessity of the interface Suggested-by: Dave Hansen # Details of the interface Signed-off-by: Ricardo Neri --- arch/x86/include/asm/topology.h | 2 ++ arch/x86/kernel/cpu/topology.c | 23 +++ 2 files changed, 25 insertions(+) diff --gi

[PATCH 1/4] drivers core: Introduce CPU type sysfs interface

2020-10-02 Thread Ricardo Neri
Len Brown # Necessity of the interface Suggested-by: Dave Hansen # Details of the interface Signed-off-by: Ricardo Neri --- .../ABI/testing/sysfs-devices-system-cpu | 13 ++ drivers/base/cpu.c| 214 ++ include/linux/cpu.h

[PATCH 2/4] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2020-10-02 Thread Ricardo Neri
Lutomirski Cc: Dave Hansen Cc: Kan Liang Cc: Len Brown Cc: "Peter Zijlstra (Intel)" Cc: "Rafael J. Wysocki" Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: Srinivas Pandruvada Cc: linux-kernel@vger.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri

[PATCH 3/4] x86/cpu/intel: Add function to get name of hybrid CPU types

2020-10-02 Thread Ricardo Neri
: Len Brown Cc: "Rafael J. Wysocki" Cc: "Ravi V. Shankar" Cc: Srinivas Pandruvada Cc: linux-kernel@vger.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- arch/x86/include/asm/intel-family.h | 4 arch/x86/kernel/cpu/cpu.h | 3 +++ arch/x8

[PATCH 0/4] drivers core: Introduce CPU type sysfs interface

2020-10-02 Thread Ricardo Neri
that architectures can override to suit their needs. The three patches patches implement such interface for x86 (as per request from Boris, I pulled patch 2 from a separate submission [1]). Thanks and BR, Ricardo [1]. https://lkml.org/lkml/2020/10/2/1013 Ricardo Neri (4): drivers core: Introduce CPU type sysfs

Re: [PATCH 2/3] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2020-10-02 Thread Ricardo Neri
On Fri, Oct 02, 2020 at 11:03:06PM +0200, Borislav Petkov wrote: > On Fri, Oct 02, 2020 at 02:02:31PM -0700, Ricardo Neri wrote: > > What about patches 1 and 3? Should I resubmit the series with only > > those? > > Why would you need to resubmit? They're good to go a

Re: [PATCH 2/3] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2020-10-02 Thread Ricardo Neri
On Fri, Oct 02, 2020 at 10:34:52PM +0200, Borislav Petkov wrote: > On Fri, Oct 02, 2020 at 01:19:30PM -0700, Ricardo Neri wrote: > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > > index 35ad8480c464..0778b3ad26b3 100644 > > --- a/arch/x86/kernel/c

[PATCH 2/3] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2020-10-02 Thread Ricardo Neri
Lutomirski Cc: Dave Hansen Cc: Kan Liang Cc: Len Brown Cc: "Peter Zijlstra (Intel)" Cc: "Rafael J. Wysocki" Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: Srinivas Pandruvada Cc: linux-kernel@vger.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo N

[PATCH 3/3] x86/mce: include type of core when reporting a machine check error

2020-10-02 Thread Ricardo Neri
kernels and hybrid hardware can still understand the format of the reported error format. Cc: "Ravi V Shankar" Cc: linux-e...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- arch/x86/include/uapi/asm/mce.h | 1 + arch/x86/kernel/cpu/

[PATCH 1/3] x86/cpufeatures: Enumerate hybrid CPU feature bit

2020-10-02 Thread Ricardo Neri
; Cc: Srinivas Pandruvada Cc: linux-kernel@vger.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index dad350d42ecf..26ec

[PATCH 0/3] x86: Add initial support to discover Intel hybrid CPUs

2020-10-02 Thread Ricardo Neri
will use the proposed functionality to expose the CPU topology to user space. Thanks and BR, Ricardo [1]. https://software.intel.com/content/dam/develop/public/us/en/documents/325462-sdm-vol-1-2abcd-3abcd.pdf Vol 2. Section 3.2.CPUID leaf 0x1a Ricardo Neri (3): x86/cpufeatures: Enumerate hybrid

[PATCH] powercap/rapl: Add support for Lakefield

2020-08-21 Thread Ricardo Neri
Simply add Lakefield model ID. No additional changes are needed. Cc: Zhang Rui Cc: "Rafael J. Wysocki" Cc: "Ravi V. Shankar" Signed-off-by: Ricardo Neri --- drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/powercap/in

Re: [PATCH] x86/cpu: Fix typos and improve the comments in sync_core()

2020-08-18 Thread Ricardo Neri
On Tue, Aug 18, 2020 at 07:31:30AM +0200, Ingo Molnar wrote: > > * tip-bot2 for Ricardo Neri wrote: > > > --- a/arch/x86/include/asm/sync_core.h > > +++ b/arch/x86/include/asm/sync_core.h > > @@ -5,6 +5,7 @@ > > #include > > #include > >

[tip: x86/cpu] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-17 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: bf9c912f9a649776c2d741310486a6984edaac72 Gitweb: https://git.kernel.org/tip/bf9c912f9a649776c2d741310486a6984edaac72 Author:Ricardo Neri AuthorDate:Thu, 06 Aug 2020 20:28:33 -07:00 Committer

[PATCH v4] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-06 Thread Ricardo Neri
Tony Luck Suggested-by: Andy Lutomirski Signed-off-by: Ricardo Neri --- This is v4 from my three previous submission [1], [2], and [3]. The first three patches of the series have been merged in Linus' tree. Hence, I am submitting only this patch for review. [1]. https://lkml.org/lkml/20

Re: [PATCH v3] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-06 Thread Ricardo Neri
On Thu, Aug 06, 2020 at 04:08:47PM -0700, Dave Hansen wrote: > On 8/6/20 4:04 PM, Ricardo Neri wrote: > > * CPUID is the conventional way, but it's nasty: it doesn't > > * exist on some 486-like CPUs, and it usually exits to a > > * hypervisor. > >

Re: [PATCH v3] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-06 Thread Ricardo Neri
On Thu, Aug 06, 2020 at 12:57:26PM -0700, Dave Hansen wrote: > On 8/6/20 12:25 PM, Ricardo Neri wrote: > > static inline void sync_core(void) > > { > > /* > > -* There are quite a few ways to do this. IRET-to-self is nice > > +* Hardware can do this

[PATCH v3] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-06 Thread Ricardo Neri
Tony Luck Suggested-by: Andy Lutomirski Signed-off-by: Ricardo Neri --- This is a v3 from my two previous submissions [1], [2]. The first three patches of the series have been merged into Linus' tree. Hence, I am submitting only this patch for review. [1]. https://lkml.org/lkml/2020/7/27/8 [2]. h

Re: [PATCH v2] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-05 Thread Ricardo Neri
On Wed, Aug 05, 2020 at 06:48:40AM +0200, Borislav Petkov wrote: > On Tue, Aug 04, 2020 at 07:10:59PM -0700, Ricardo Neri wrote: > > The SERIALIZE instruction gives software a way to force the processor to > > complete all modifications to flags, registers and memory from previous &

Re: [PATCH v2] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-05 Thread Ricardo Neri
On Wed, Aug 05, 2020 at 07:08:08AM +0200, Borislav Petkov wrote: > On Tue, Aug 04, 2020 at 09:58:25PM -0700, h...@zytor.com wrote: > > Because why use an alternative to jump over one instruction? > > > > I personally would prefer to have the IRET put out of line > > Can't yet - SERIALIZE CPUs are

Re: [PATCH v2] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-05 Thread Ricardo Neri
On Wed, Aug 05, 2020 at 11:28:31AM -0700, Andy Lutomirski wrote: > On Wed, Aug 5, 2020 at 10:07 AM Ricardo Neri > wrote: > > > > On Wed, Aug 05, 2020 at 07:08:08AM +0200, Borislav Petkov wrote: > > > On Tue, Aug 04, 2020 at 09:58:25PM -0700, h...@zytor.com wro

[PATCH v2] x86/cpu: Use SERIALIZE in sync_core() when available

2020-08-04 Thread Ricardo Neri
lable. Cc: Andy Lutomirski Cc: Cathy Zhang Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Kyung Min Park Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: linux-e...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Andy Lutomirsk

Re: [PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available

2020-07-27 Thread Ricardo Neri
On Mon, Jul 27, 2020 at 03:30:20PM +0200, pet...@infradead.org wrote: > On Mon, Jul 27, 2020 at 03:05:36PM +0200, pet...@infradead.org wrote: > > Yeah, I'm not sure.. the 'funny' thing is that typically call > > sync_core() from an IPI anyway. And the synchronous broadcast IPI is by > > far the

Re: [PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available

2020-07-27 Thread Ricardo Neri
On Mon, Jul 27, 2020 at 05:47:32AM -0700, h...@zytor.com wrote: > On July 27, 2020 1:20:03 AM PDT, pet...@infradead.org wrote: > >On Sun, Jul 26, 2020 at 09:31:32PM -0700, Ricardo Neri wrote: > >> +static inline void serialize(void) > >> +{ > >> +

Re: [PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available

2020-07-27 Thread Ricardo Neri
On Mon, Jul 27, 2020 at 10:20:03AM +0200, pet...@infradead.org wrote: > On Sun, Jul 26, 2020 at 09:31:32PM -0700, Ricardo Neri wrote: > > +static inline void serialize(void) > > +{ > > + asm volatile(".byte 0xf, 0x1, 0xe8"); > > +} > > Can we pre

Re: [PATCH 0/4] x86/cpu: Use SERIALIZE in sync_core()

2020-07-27 Thread Ricardo Neri
On Mon, Jul 27, 2020 at 01:07:08PM +0200, Ingo Molnar wrote: > > * Ricardo Neri wrote: > > > A recent submission to LKML introduced a CPU feature flag for a new > > Intel architecture Serializing Instruction, SERIALIZE [1]. Unlike the > > existing Serializing Instruc

[tip: x86/cpu] x86/cpufeatures: Add enumeration for SERIALIZE instruction

2020-07-27 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 85b23fbc7d88f8c6e3951721802d7845bc39663d Gitweb: https://git.kernel.org/tip/85b23fbc7d88f8c6e3951721802d7845bc39663d Author:Ricardo Neri AuthorDate:Sun, 26 Jul 2020 21:31:29 -07:00 Committer

[tip: x86/cpu] x86/cpu: Relocate sync_core() to sync_core.h

2020-07-27 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 9998a9832c4027e907353e5e05fde730cf624b77 Gitweb: https://git.kernel.org/tip/9998a9832c4027e907353e5e05fde730cf624b77 Author:Ricardo Neri AuthorDate:Sun, 26 Jul 2020 21:31:30 -07:00 Committer

[tip: x86/cpu] x86/cpu: Refactor sync_core() for readability

2020-07-27 Thread tip-bot2 for Ricardo Neri
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: f69ca629d89d65737537e05308ac531f7bb07d5c Gitweb: https://git.kernel.org/tip/f69ca629d89d65737537e05308ac531f7bb07d5c Author:Ricardo Neri AuthorDate:Sun, 26 Jul 2020 21:31:31 -07:00 Committer

[PATCH 3/4] x86/cpu: Refactor sync_core() for readability

2020-07-26 Thread Ricardo Neri
Zhang Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Kyung Min Park Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: linux-e...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-

[PATCH 2/4] x86/cpu: Relocate sync_core() to sync_core.h

2020-07-26 Thread Ricardo Neri
.kernel.org Reviewed-by: Tony Luck Signed-off-by: Ricardo Neri --- --- arch/x86/include/asm/processor.h| 64 - arch/x86/include/asm/sync_core.h| 64 + arch/x86/kernel/alternative.c | 1 + arch/x86/kernel/cpu/mce/core.c

[PATCH 4/4] x86/cpu: Use SERIALIZE in sync_core() when available

2020-07-26 Thread Ricardo Neri
Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: linux-e...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviwed-by: Tony Luck Suggested-by: Andy Lutomirski Signed-off-by: Ricardo Neri --- --- arch/x86/include/asm/special_insns.h | 5 + arch/x86/include/asm/

[PATCH 1/4] x86/cpufeatures: Add enumeration for SERIALIZE instruction

2020-07-26 Thread Ricardo Neri
Cc: Cathy Zhang Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Kyung Min Park Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Sean Christopherson Cc: Tony Luck Cc: linux-e...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Dave Hansen Reviewed-by: Tony Luck Signed-o

[PATCH 0/4] x86/cpu: Use SERIALIZE in sync_core()

2020-07-26 Thread Ricardo Neri
es/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf [3]. https://lore.kernel.org/kvm/CALCETrWudiF8G8r57r5i4JefuP5biG1kHg==0o8yxb-bys-...@mail.gmail.com/ Ricardo Neri (4): x86/cpufeatures: Add enumeration for SERIALIZE instruction x86/cpu: Relocate

Re: [PATCH v2 1/4] x86/cpufeatures: Add enumeration for SERIALIZE instruction

2020-07-23 Thread Ricardo Neri
On Thu, Jul 23, 2020 at 01:02:43AM +0200, Thomas Gleixner wrote: > Ricardo Neri writes: > > On Tue, Jul 07, 2020 at 09:36:15AM -0700, Andy Lutomirski wrote: > >> On Mon, Jul 6, 2020 at 7:21 PM Cathy Zhang wrote: > >> > > >> > This instruction g

Re: [PATCH v5] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-07-13 Thread Ricardo Neri
Reported-by: Andreas Rammhold > Originally-by: Ricardo Neri > Signed-off-by: Brendan Shanks FWIW, tested on hardware with UMIP. Reviewed-by: Ricardo Neri Tested-by: Ricardo Neri Thanks and BR, Ricardo

Re: [PATCH v5] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-07-13 Thread Ricardo Neri
ing SLDT that > >were crashing when run on UMIP-enabled systems. > > > >Reported-by: Andreas Rammhold > >Originally-by: Ricardo Neri > >Signed-off-by: Brendan Shanks > >--- > > > >v5: Capitalize instruction names in comments. > > > > a

Re: [PATCH v2 1/4] x86/cpufeatures: Add enumeration for SERIALIZE instruction

2020-07-07 Thread Ricardo Neri
On Tue, Jul 07, 2020 at 09:36:15AM -0700, Andy Lutomirski wrote: > On Mon, Jul 6, 2020 at 7:21 PM Cathy Zhang wrote: > > > > This instruction gives software a way to force the processor to complete > > all modifications to flags, registers and memory from previous instructions > > and drain all

Re: [PATCH v4] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-09 Thread Ricardo Neri
Reported-by: Andreas Rammhold > Originally-by: Ricardo Neri > Signed-off-by: Brendan Shanks > --- > > v4: Use braces for every clause of the conditional. I tried a switch(), > but it takes more lines and looks more cluttered (especially with the > #ifdef). > Also replace out-o

Re: [PATCH v3] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-08 Thread Ricardo Neri
On Mon, Jun 08, 2020 at 05:38:12PM -0700, Ricardo Neri wrote: > On Mon, Jun 08, 2020 at 03:44:24PM -0700, Brendan Shanks wrote: > > Add emulation/spoofing of SLDT and STR for both 32- and 64-bit > > processes. > > > > Wine users have found a small number of Windows ap

Re: [PATCH v3] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-08 Thread Ricardo Neri
Reported-by: Andreas Rammhold > Originally-by: Ricardo Neri > Signed-off-by: Brendan Shanks > --- > > v3: Use (GDT_ENTRY_TSS * 8) for task register selector instead of > harcoding 0x40. > > arch/x86/kernel/umip.c | 32 +++- > 1 file changed,

Re: [PATCH v2] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-08 Thread Ricardo Neri
Reported-by: Andreas Rammhold > Originally-by: Ricardo Neri > Signed-off-by: Brendan Shanks > --- > > v2: Return (GDT_ENTRY_LDT * 8) for SLDT when an LDT is set. > > arch/x86/kernel/umip.c | 34 +- > 1 file changed, 25 insertions(+), 9 deletion

Re: [PATCH] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-05 Thread Ricardo Neri
On Fri, Jun 05, 2020 at 11:58:13AM -0700, Brendan Shanks wrote: > > > On Jun 3, 2020, at 9:39 PM, Andy Lutomirski wrote: > > > > On Wed, Jun 3, 2020 at 5:12 PM Ricardo Neri > > > <mailto:ricardo.neri-calde...@linux.intel.com>> wrote: > >> > &

Re: [PATCH] x86/umip: Add emulation/spoofing for SLDT and STR instructions

2020-06-03 Thread Ricardo Neri
Reported-by: Andreas Rammhold > Originally-by: Ricardo Neri > Signed-off-by: Brendan Shanks > --- > arch/x86/kernel/umip.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/arch/x86/kernel/umip.c b/arch/x86/kernel/umip.c

Re: [PATCH v2 2/3] x86, sched: Bail out of frequency invariance if turbo frequency is unknown

2020-06-01 Thread Ricardo Neri
ff-by: Giovanni Gherdovich > Suggested-by: Ricardo Neri FWIW, Tested-by: Ricardo Neri

Re: umip: AMD Ryzen 3900X, pagefault after emulate SLDT/SIDT instruction

2020-05-26 Thread Ricardo Neri
On Sat, May 23, 2020 at 04:17:39AM +0200, Andreas Rammhold wrote: > On 12:43 19.05.20, Ricardo Neri wrote: > > I have a patch for this already that I wrote for testing purposes: > > https://github.com/ricardon/tip/commit/1692889cb3f8accb523d44b682458e234b93be50 > > P

Re: umip: AMD Ryzen 3900X, pagefault after emulate SLDT/SIDT instruction

2020-05-20 Thread Ricardo Neri
On Tue, May 19, 2020 at 05:54:53PM -0700, Andy Lutomirski wrote: > On Tue, May 19, 2020 at 12:43 PM Ricardo Neri > wrote: > > > > On Tue, May 19, 2020 at 11:56:40AM -0700, Brendan Shanks wrote: > > > > > > > On May 19, 2020, at 7:38 AM, Andreas Rammh

Re: umip: AMD Ryzen 3900X, pagefault after emulate SLDT/SIDT instruction

2020-05-19 Thread Ricardo Neri
On Tue, May 19, 2020 at 11:56:40AM -0700, Brendan Shanks wrote: > > > On May 19, 2020, at 7:38 AM, Andreas Rammhold wrote: > > > > Hi, > > > > I've been running into a weird problem with UMIP on a current Ryzen > > 3900x with kernel 5.6.11 where a process receives a page fault after the > >

Re: [PATCH 1/2] x86, sched: Prevent divisions by zero in frequency invariant accounting

2020-05-18 Thread Ricardo Neri
On Sat, May 02, 2020 at 04:25:00PM +0200, Giovanni Gherdovich wrote: > > > > I've changed the patch like so.. OK? > > > > (ok, perhaps I went a little overboard with the paranoia ;-) > > Right, I wasn't really checking for overflow, only for when the product > "mcnt * arch_max_freq_ratio"

Re: [PATCH 2/2] x86, sched: Bail out of frequency invariance if turbo frequency is unknown

2020-05-01 Thread Ricardo Neri
ition > > scale-invariant calculations can't be performed. > > > > Signed-off-by: Giovanni Gherdovich > > Suggested-by: Ricardo Neri > > Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance") > > --- > > arch/x86/kernel/smp

Re: [PATCH 2/2] x86, sched: Bail out of frequency invariance if turbo frequency is unknown

2020-05-01 Thread Ricardo Neri
ff-by: Giovanni Gherdovich > Suggested-by: Ricardo Neri Thanks for implementing this, Giovanni! Tested-by: Ricardo Neri

Re: [PATCH] x86/umip: Add emulation for 64-bit processes

2019-09-07 Thread Ricardo Neri
n run on > UMIP-enabled systems. Emulation support for 64-bit processes was not initially included because no use cases had been identified. Brendan has found one. Here is the relevant e-mail thread: https://lkml.org/lkml/2017/1/26/12 FWIW, Reviewed-by: Ricardo Neri Only one m

Re: [Kernel BUG?] SMSW operation get success on UMIP KVM guest

2019-07-01 Thread Ricardo Neri
On Mon, Jul 01, 2019 at 08:57:28PM +0800, Li Wang wrote: > On Mon, Jul 1, 2019 at 8:02 PM Paolo Bonzini wrote: > > > On 01/07/19 09:50, Li Wang wrote: > > > Hello there, > > > > > > LTP/umip_basic_test get failed on KVM UMIP > > > system(kernel-v5.2-rc4.x86_64). The test is only trying to do > >

Re: [Kernel BUG?] SMSW operation get success on UMIP KVM guest

2019-07-01 Thread Ricardo Neri
On Mon, Jul 01, 2019 at 02:02:35PM +0200, Paolo Bonzini wrote: > On 01/07/19 09:50, Li Wang wrote: > > Hello there, > > > > LTP/umip_basic_test get failed on KVM UMIP > > system(kernel-v5.2-rc4.x86_64). The test is only trying to do > >      asm volatile("smsw %0\n" : "=m" (val)); > > and expect

[tip:x86/cpu] x86/mtrr: Skip cache flushes on CPUs with cache self-snooping

2019-06-27 Thread tip-bot for Ricardo Neri
Commit-ID: fd329f276ecaad7a371d6f91b9bbea031d0c3440 Gitweb: https://git.kernel.org/tip/fd329f276ecaad7a371d6f91b9bbea031d0c3440 Author: Ricardo Neri AuthorDate: Thu, 27 Jun 2019 19:35:37 -0700 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 07:21:00 +0200 x86/mtrr: Skip cache

[tip:x86/cpu] x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata

2019-06-27 Thread tip-bot for Ricardo Neri
Commit-ID: 1e03bff3600101bd9158d005e4313132e55bdec8 Gitweb: https://git.kernel.org/tip/1e03bff3600101bd9158d005e4313132e55bdec8 Author: Ricardo Neri AuthorDate: Thu, 27 Jun 2019 19:35:36 -0700 Committer: Thomas Gleixner CommitDate: Fri, 28 Jun 2019 07:20:48 +0200 x86/cpu/intel: Clear

[PATCH v2 1/2] x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata

2019-06-27 Thread Ricardo Neri
ested-by: Alan Cox Signed-off-by: Ricardo Neri --- arch/x86/kernel/cpu/intel.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index f17c1a714779..62e366ec0812 100644 --- a/arch/x86/kernel/cpu/intel.c +++

[PATCH v2 2/2] x86, mtrr: generic: Skip cache flushes on CPUs with cache self-snooping

2019-06-27 Thread Ricardo Neri
avi V. Shankar" Reported-by: Mohammad Etemadi Signed-off-by: Ricardo Neri --- arch/x86/kernel/cpu/mtrr/generic.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 9356c1c9024d..aa5c

[PATCH v2 0/2] Speed MTRR programming up when we can

2019-06-27 Thread Ricardo Neri
.intel.com/content/dam/www/public/us/en/documents/specification-updates/pentium-dual-core-specification-update.pdf Ricardo Neri (2): x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata x86, mtrr: generic: Skip cache flushes on CPUs with cache self-snooping arch/

Re: [PATCH 1/2] x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata

2019-06-27 Thread Ricardo Neri
On Thu, Jun 27, 2019 at 10:38:13PM +0200, Thomas Gleixner wrote: > Ricardo, > > On Thu, 27 Jun 2019, Ricardo Neri wrote: > > > > +/* > > + * Processors which have self-snooping capability can handle conflicting > > + * memory type across CPUs by snooping its

[PATCH 1/2] x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata

2019-06-27 Thread Ricardo Neri
c: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Cc: Jordan Borgner Cc: "Ravi V. Shankar" Cc: x...@kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Alan Cox Signed-off-by: Ricardo Neri --- arch/x86/kernel/cpu/intel.c | 30 ++ 1 file changed

[PATCH 0/2] Speed MTRR programming up when we can

2019-06-27 Thread Ricardo Neri
/documents/specification-updates/pentium-dual-core-desktop-e2000-specification-update.pdf [6]. Errata AN107, AN109, https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/pentium-dual-core-specification-update.pdf Ricardo Neri (2): x86/cpu/intel: Clear cache self-snoop

[PATCH 2/2] x86, mtrr: generic: Skip cache flushes on CPUs with cache self-snooping

2019-06-27 Thread Ricardo Neri
avi V. Shankar" Reported-by: Mohammad Etemadi Signed-off-by: Ricardo Neri --- arch/x86/kernel/cpu/mtrr/generic.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 9356c1c9024d..169672a6935c 10

[RFC PATCH v4 06/21] x86/hpet: Configure the timer used by the hardlockup detector

2019-05-23 Thread Ricardo Neri
Kleen Cc: Tony Luck Cc: Clemens Ladisch Cc: Arnd Bergmann Cc: Philippe Ombredanne Cc: Kate Stewart Cc: "Rafael J. Wysocki" Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: "Ravi V. Shankar" Cc: x...@kernel.org Signed-off-by: Ricardo Neri --- arch/x86/include/asm/hpet.

[RFC PATCH v4 13/21] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-05-23 Thread Ricardo Neri
ro Yamada Cc: Nayna Jain Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: "Ravi V. Shankar" Cc: x...@kernel.org Suggested-by: Andi Kleen Signed-off-by: Ricardo Neri --- arch/x86/include/asm/hpet.h | 2 ++ arch/x86/kernel/watchdog_hld_hpet.c | 27 ++-

[RFC PATCH v4 04/21] x86/hpet: Add hpet_set_comparator() for periodic and one-shot modes

2019-05-23 Thread Ricardo Neri
te Stewart Cc: "Rafael J. Wysocki" Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: "Ravi V. Shankar" Cc: x...@kernel.org Originally-by: Suravee Suthikulpanit Signed-off-by: Ricardo Neri --- arch/x86/include/asm/hpet.h | 1 + arch/x86/kernel/hpet.c | 57 ++

[RFC PATCH v4 17/21] x86/tsc: Switch to perf-based hardlockup detector if TSC become unstable

2019-05-23 Thread Ricardo Neri
. Signed-off-by: Ricardo Neri --- arch/x86/include/asm/hpet.h| 2 ++ arch/x86/kernel/tsc.c | 2 ++ arch/x86/kernel/watchdog_hld.c | 7 +++ 3 files changed, 11 insertions(+) diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h index fd99f2390714..a82cbe17479d 100644

[RFC PATCH v4 11/21] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-05-23 Thread Ricardo Neri
ikulpanit Cc: x...@kernel.org Signed-off-by: Ricardo Neri --- arch/x86/Kconfig.debug | 11 + arch/x86/include/asm/hpet.h | 13 ++ arch/x86/kernel/Makefile| 1 + arch/x86/kernel/hpet.c | 3 +- arch/x86/kernel/watchdog_hld_hpet.c | 335 +++

[RFC PATCH v4 19/21] iommu/vt-d: Rework prepare_irte() to support per-irq delivery mode

2019-05-23 Thread Ricardo Neri
lpanit Cc: "Ravi V. Shankar" Cc: x...@kernel.org Cc: io...@lists.linux-foundation.org Signed-off-by: Ricardo Neri --- drivers/iommu/intel_irq_remapping.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/i

[RFC PATCH v4 15/21] watchdog/hardlockup/hpet: Only enable the HPET watchdog via a boot parameter

2019-05-23 Thread Ricardo Neri
;Ravi V. Shankar" Cc: x...@kernel.org Signed-off-by: Ricardo Neri -- checkpatch gives the following warning: CHECK: __setup appears un-documented -- check Documentation/admin-guide/kernel-parameters.rst +__setup("nmi_watchdog=", hardlockup_detector_hpet_setup); This is a fal

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-10 Thread Ricardo Neri
On Wed, Apr 10, 2019 at 09:01:52AM +0200, Peter Zijlstra wrote: > On Tue, Apr 09, 2019 at 06:19:57PM -0700, Ricardo Neri wrote: > > On Tue, Apr 09, 2019 at 01:28:17PM +0200, Peter Zijlstra wrote: > > > > @@ -147,6 +161,14 @@ static void set_periodic(struct hpet_hld

  1   2   3   4   5   6   7   8   9   10   >