Re: How can a userspace program tell if the system supports the ACPI S4 state (Suspend-to-Disk)?

2021-02-09 Thread James Morse
Hi Dexuan, On 05/02/2021 19:36, Dexuan Cui wrote: >> From: Rafael J. Wysocki >> Sent: Friday, February 5, 2021 5:06 AM >> To: Dexuan Cui >> Cc: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; >> linux-hyp...@vger.kernel.org; Michael Kelley >> Subject: Re: How can a userspace program t

Re: [PATCH] firmware: arm_sdei: remove unused interfaces

2020-05-19 Thread James Morse
Hi Xiongfeng, On 05/05/2020 03:08, Xiongfeng Wang wrote: > On 2020/5/5 1:14, James Morse wrote: >> Hi Christoph, >> >> (CC: +Xiongfeng) >> >> Thanks for the reminder - I was just searching for who was using this. > > Thanks for CC me. We do have a driver

Re: [PATCH v13 1/2] ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records

2020-07-31 Thread James Morse
Hi Shiju, On 22/07/2020 13:50, Andy Shevchenko wrote: > On Wed, Jul 22, 2020 at 12:34:23PM +, Shiju Jose wrote: >>>> Co-developed-by: James Morse >>> >>> Co-developed-by: is going _in conjunction with_ SoB tag which is missing >>> here. >> T

Re: [PATCH] ACPI / APEI: do memory failure on the physical address reported by ARM processor error section

2020-07-31 Thread James Morse
Hi Tan, On 30/07/2020 08:32, Xiaofei Tan wrote: > After the following commit applied, user-mode SEA is preferentially > processed by APEI. Do memory failure to recover. > > But there are some problems: > 1) The function apei_claim_sea() has processed an CPER, does not > mean that memory failure h

Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-04-06 Thread James Morse
Hi Reinette, On 31/03/2021 22:35, Reinette Chatre wrote: > On 3/12/2021 9:58 AM, James Morse wrote: >> resctrl is the defacto Linux ABI for SoC resource partitioning features. >> To support it on another architecture, it needs to be abstracted from >> the features provided

Re: [PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-04-06 Thread James Morse
Hi Babu, On 30/03/2021 21:36, Babu Moger wrote: > On 3/12/21 11:58 AM, James Morse wrote: >> This series re-folds the resctrl code so the CDP resources (L3CODE et al) >> behaviour is all contained in the filesystem parts, with a minimum amount >> of arch specific code. &g

Re: [PATCH 1/3] x86/resctrl: Move setting task's active CPU in a mask into helpers

2020-12-09 Thread James Morse
Hi Reinette, Fenghua, On 03/12/2020 23:25, Reinette Chatre wrote: > From: Fenghua Yu > > The code of setting the CPU on which a task is running in a CPU mask is > moved into a couple of helpers. The new helper task_on_cpu() will be > reused shortly. > diff --git a/arch/x86/kernel/cpu/resctrl/rd

Re: [PATCH 2/3] x86/resctrl: Update PQR_ASSOC MSR synchronously when moving task to resource group

2020-12-09 Thread James Morse
This is the same way used to update the register when tasks are moved as > part of resource group removal. (as t->on_cpu is already used...) Reviewed-by: James Morse > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > in

Re: [PATCH v6 1/7] arm64: mm: Move reserve_crashkernel() into mem_init()

2020-11-19 Thread James Morse
Hi, (sorry for the late response) On 06/11/2020 18:46, Nicolas Saenz Julienne wrote: > On Thu, 2020-11-05 at 16:11 +0000, James Morse wrote:>> We also depend on > this when skipping the checksum code in purgatory, which can be >> exceedingly slow. > > This one I don

Re: [PATCH] arm64: kexec: Use smp_send_stop in machine_shutdown

2020-11-19 Thread James Morse
Hi Henry, On 16/11/2020 21:11, Henry Willard wrote: > On 11/11/20 10:11 AM, James Morse wrote: >> On 06/11/2020 23:25, Henry Willard wrote: >>> machine_shutdown() is called by kernel_kexec() to shutdown >>> the non-boot CPUs prior to starting the new kernel

Re: [PATCH 2/2] x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update race

2020-11-20 Thread James Morse
to on another CPU. It might get torn values, or multiple-reads get different values. The READ_ONCE/WRITE_ONCEry would have been easier to read as a separate patch as you touch all sites, and move/change some of them. Regardless: Reviewed-by: James Morse I don't 'get' memory-orderi

Re: [PATCH 1/2] x86/intel_rdt: Check monitor group vs control group membership earlier

2020-11-20 Thread James Morse
27;s needed to do the kfree()) > Check the validity of the move before getting anywhere near task_work > callbacks. This saves the kzalloc()/task_work_add() if it wasn't going to be necessary. Reviewed-by: James Morse Thanks, James

Re: [PATCH v4 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-25 Thread James Morse
Hi Steven, Catalin, On 18/11/2020 16:01, Steven Price wrote: > On 17/11/2020 16:07, Catalin Marinas wrote: >> On Mon, Oct 26, 2020 at 03:57:27PM +, Steven Price wrote: >>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c >>> index 19aacc7d64de..38fe25310ca1 100644 >>> --- a/arch/arm64/

Re: [PATCH 01/24] x86/resctrl: Split struct rdt_resource

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 19:20, Reinette Chatre wrote: > On 10/30/2020 9:10 AM, James Morse wrote: >> Splitting rdt_domain up in a similar way happens in the next patch. >> No change in behaviour, this patch just moves types around. > > Please remove the "this pat

Re: [PATCH 03/24] x86/resctrl: Add resctrl_arch_get_num_closid()

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 19:57, Reinette Chatre wrote: > On 10/30/2020 9:10 AM, James Morse wrote: >> resctrl chooses whether to enable CDP, once it does, half the number >> of closid are available. MPAM doesn't behave like this, an in-kernel user >> of MPAM could be

Re: [PATCH 04/24] x86/resctrl: Add a separate schema list for resctrl

2021-03-12 Thread James Morse
Hi Reinette On 17/11/2020 21:29, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> To support multiple architectures, the resctrl code needs to be split >> into a 'fs' specific part in core code, and an arch-specific backend. >> >> It shou

Re: [PATCH 05/24] x86/resctrl: Pass the schema in resdir's private pointer

2021-03-12 Thread James Morse
uld it be changed to "info dir"? Sure, > On 10/30/2020 9:11 AM, James Morse wrote: >> Moving properties that resctrl exposes to user-space into the core >> 'fs' code, (e.g. the name of the schema), means some of the functions >> that back the filesystem

Re: [PATCH 06/24] x86/resctrl: Store the effective num_closid in the schema

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:04, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> resctrl_schema holds properties that vary with the style of configuration >> that resctrl applies to a resource. >> >> Once the arch code has a single resource per c

Re: [PATCH 07/24] x86/resctrl: Label the resources with their configuration type

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:30, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Before the name for the schema can be generated, the type of the >> configuration being applied to the resource needs to be known. Label >> all the entries in rdt_resources

Re: [PATCH 08/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:52, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Now that resctrl has its own list of resources it is using, walk that >> list instead of the architectures list. This means resctrl has somewhere >> to keep schema propert

Re: [PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:11, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Move the names used for the schemata file out of the resource and >> into struct resctrl_schema. This allows one resource to have two >> different names, based on the ot

Re: [PATCH 11/24] x86/resctrl: Group staged configuration into a separate struct

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:28, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Arm's MPAM may have surprisingly large bitmaps for its cache >> portions as the architecture allows up to 4K portions. The size >> exposed via resctrl may not be

Re: [PATCH 12/24] x86/resctrl: Add closid to the staged config

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:46, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Once the L2/L2CODE/L2DATA resources are merged, there may be two >> configurations staged for one resource when CDP is enabled. The >> closid should always be pa

[PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-03-12 Thread James Morse
947.39194-1-james.mo...@arm.com/ Thanks, James Morse (24): x86/resctrl: Split struct rdt_resource x86/resctrl: Split struct rdt_domain x86/resctrl: Add a separate schema list for resctrl x86/resctrl: Pass the schema in info dir's private pointer x86/resctrl: Label the resources wit

[PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-03-12 Thread James Morse
cture only moves types around, and should not lead to any change in behaviour. Splitting rdt_domain up in a similar way happens in the next patch. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Tabs space and other whitespace * Restored for_each_rdt_resource() calls in

[PATCH v2 05/24] x86/resctrl: Label the resources with their configuration type

2021-03-12 Thread James Morse
to struct resctrl_schema. Copying the value ensures there is no mismatch, but allows the filesystem parts of resctrl to be modified to use the schema. Once the resources are merged, the filesystem code can assign this value based on the schema being created. Reviewed-by: Jamie Iles Signed-off-by: J

[PATCH v2 04/24] x86/resctrl: Pass the schema in info dir's private pointer

2021-03-12 Thread James Morse
oo. This difference means the type of the private pointers varies between control and monitor info dirs. If the flags are RF_MON_INFO, its a struct rdt_resource. If the flags are RF_CTRL_INFO, its a struct resctrl_schema. Nothing in res_common_files[] has both flags. Reviewed-by: Jamie Iles Signed

[PATCH v2 02/24] x86/resctrl: Split struct rdt_domain

2021-03-12 Thread James Morse
into a new header file. resctrl code paths touching a 'hw' struct indicates where an abstraction is needed. Splitting this structure only moves types around, and should not lead to any change in behaviour. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Tabs

[PATCH v2 03/24] x86/resctrl: Add a separate schema list for resctrl

2021-03-12 Thread James Morse
d the name and type of configuration values for resctrl. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Renamed resctrl_all_schema list * Used schemata_list as a prefix to make these easier to search for * Added kerneldoc string * Removed 'pending configuratio

[PATCH v2 07/24] x86/resctrl: Store the effective num_closid in the schema

2021-03-12 Thread James Morse
e are changed to use the schema value instead. schemata_list_create() sets this value, and reaches into the architecture specific structure to get the value. This will eventually be replaced with a helper. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Added missing :

[PATCH v2 08/24] x86/resctrl: Add resctrl_arch_get_num_closid()

2021-03-12 Thread James Morse
Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Rewrote commit message * Whitespace fixes * num_closid becomes u32 in all occurences to reduce surprises --- arch/x86/kernel/cpu/resctrl/core.c | 5 + arch/x86/kernel/cpu/resctrl/internal.h | 2 +- arch/x86/kernel/cp

[PATCH v2 06/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2021-03-12 Thread James Morse
thing' helper. After the filesystem code is moved, rdtgroup_pseudo_locked_in_hierarchy() remains part of the x86 specific hooks to support psuedo lock. This code walks each domain, and still does this after the separate resources are merged. Reviewed-by: Jamie Iles Signed-off-by: James Morse -

[PATCH v2 10/24] x86/resctrl: Swizzle rdt_resource and resctrl_schema in pseudo_lock_region

2021-03-12 Thread James Morse
es Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++-- arch/x86/kernel/cpu/resctrl/internal.h| 6 +++--- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 8 arch/x86/kernel/cpu/resctrl/rdtgroup.c| 4 ++-- 4 files changed, 11 insertions(+), 11 deletion

[PATCH v2 09/24] x86/resctrl: Pass the schema to resctrl filesystem functions

2021-03-12 Thread James Morse
-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * split from a larger patch --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 23 +-- arch/x86/kernel/cpu/resctrl/internal.h| 6 +++--- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 19

[PATCH v2 11/24] x86/resctrl: Move the schemata names into struct resctrl_schema

2021-03-12 Thread James Morse
will generate two names for one resource. The filesystem code should calculate max_name_width for padding the schemata file, move this to live with the code that will generate the names. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1; * Don't hardcode max_name_

[PATCH v2 13/24] x86/resctrl: Allow different CODE/DATA configurations to be staged

2021-03-12 Thread James Morse
staged_configuration array must be used for each schema. Use the conf_type enum directly as an index. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Renamed max enum value CDP_NUM_TYPES * Whitespace and parenthesis * Missing word in the commit message --- arch/x86

[PATCH v2 14/24] x86/resctrl: Rename update_domains() resctrl_arch_update_domains()

2021-03-12 Thread James Morse
update_domains() merges the staged configuration changes into the arch codes configuration array. Rename to make it clear its part of the arch code interface to resctrl. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * The closid is no longer staged as from resctrl

[PATCH v2 19/24] x86/resctrl: Make ctrlval arrays the same size

2021-03-12 Thread James Morse
this is that the caches are reset twice, once for CODE once for DATA. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 10 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 9 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a

[PATCH v2 18/24] x86/resctrl: Pass configuration type to resctrl_arch_get_config()

2021-03-12 Thread James Morse
index in the configuration array. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 5 ++-- arch/x86/kernel/cpu/resctrl/monitor.c | 2 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 35 +++ include/linux/resctrl.h

[PATCH v2 16/24] x86/resctrl: Add a helper to read/set the CDP configuration

2021-03-12 Thread James Morse
r one resource means it is enable for all resources, as all resources would need to configure both interpretations of the closid value. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Added prototype for resctrl_arch_set_cdp_enabled() * s/Currently/Previ

[PATCH v2 20/24] x86/resctrl: Apply offset correction when config is staged

2021-03-12 Thread James Morse
changes it has made to the ctrl_val array as this allows the hardware to be updated once for a set of changes. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Removing the patch that moved the closid to the staged config means the min/max and return from

[PATCH v2 15/24] x86/resctrl: Add a helper to read a closid's configuration

2021-03-12 Thread James Morse
;t take the user-space control format at all. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 16 ++--- arch/x86/kernel/cpu/resctrl/monitor.c | 6 +++- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 43 ++- include/linux/re

[PATCH v2 12/24] x86/resctrl: Group staged configuration into a separate struct

2021-03-12 Thread James Morse
n the struct need to be specified per type configuration, and there can be one configuration of each type staged. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Expanded commit message * Removed explicit clearing of have_new_ctrl, * Moved ARRAY_SIZE() trickery to a la

[PATCH v2 17/24] x86/resctrl: Use cdp_enabled in rdt_domain_reconfigure_cdp()

2021-03-12 Thread James Morse
rdt_domain_reconfigure_cdp() infers whether CDP is enabled by checking the alloc_capable and alloc_enabled flags of the data resources. Now that we have an explicit cdp_enabled, use that. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8

[PATCH v2 22/24] x86/resctrl: Merge the ctrl_val arrays

2021-03-12 Thread James Morse
omplicates allocating and freeing the ctrl_val arrays. Add a helper to allocate the ctrl_val array, that returns the value on the L2 or L3 resource if it already exists. This gets removed once the resources are merged, and there really is only one ctrl_val array. Reviewed-by: Jamie Iles Signed-off

[PATCH v2 21/24] x86/resctrl: Calculate the index from the configuration type

2021-03-12 Thread James Morse
on the staged configuration type. This makes the static mult and offset parameters redundant. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 12 arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 17 +++-- include/linux

[PATCH v2 23/24] x86/resctrl: Remove rdt_cdp_peer_get()

2021-03-12 Thread James Morse
configuration type if cdp is enabled. Reviewed-by: Jamie Iles Signed-off-by: James Morse Changes since v1: * Expanded commit mesasge. --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 99 -- 1 file changed, 14 insertions(+), 85 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl

[PATCH v2 24/24] x86/resctrl: Merge the CDP resources

2021-03-12 Thread James Morse
iewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * rdt_get_cdp_config() is kept for its comment. --- arch/x86/kernel/cpu/resctrl/core.c | 174 ++--- arch/x86/kernel/cpu/resctrl/internal.h | 4 - arch/x86/kernel/cpu/resctrl/rdtgroup.c

Re: [PATCH v12 00/10] arm64: Add kernel probes (kprobes) support

2016-05-11 Thread James Morse
Hi David, On 27/04/16 19:52, David Long wrote: > From: "David A. Long" > > This patchset is heavily based on Sandeepa Prabhu's ARM v8 kprobes patches, > first seen in October 2013. This version attempts to address concerns raised > by > reviewers and also fixes problems discovered during testin

Re: [PATCH v12 06/10] arm64: Treat all entry code as non-kprobe-able

2016-05-12 Thread James Morse
Hi David, Pratyush On 27/04/16 19:53, David Long wrote: > From: Pratyush Anand > > Entry symbols are not kprobe safe. So blacklist them for kprobing. > > Signed-off-by: Pratyush Anand > diff --git a/arch/arm64/kernel/kprobes.c b/arch/arm64/kernel/kprobes.c > index dfa1b1f..6a1292b 100644 > --

Re: [PATCH v12 05/10] arm64: Kprobes with single stepping support

2016-05-12 Thread James Morse
Hi David, Sandeepa, On 27/04/16 19:53, David Long wrote: > From: Sandeepa Prabhu > diff --git a/arch/arm64/kernel/kprobes.c b/arch/arm64/kernel/kprobes.c > new file mode 100644 > index 000..dfa1b1f > --- /dev/null > +++ b/arch/arm64/kernel/kprobes.c > @@ -0,0 +1,520 @@ > +/* > + * arch/arm64

Re: [PATCH 1/2] arm64: Improve error reporting on set_pte_at() checks

2015-12-16 Thread James Morse
Hi Andrew, On 16/12/15 03:01, Andrew Pinski wrote: > On Tue, Dec 9, 2015 at 17:26:56, Catalin Marinas > wrote: >> >> Currently the BUG_ON() checks do not give enough information about the PTEs >> being set. This patch changes BUG_ON to WARN_ONCE and dumps the values of >> the old and new PTEs.

Re: [PATCH] arm64: Add missing linux/bug.h include in asm/pgtable.h

2015-12-14 Thread James Morse
On 14/12/15 16:38, Catalin Marinas wrote: > On Mon, Dec 14, 2015 at 04:26:48PM +, Julien Grall wrote: >> On 14/12/15 16:22, Catalin Marinas wrote: >>> On Mon, Dec 14, 2015 at 04:07:24PM +, Julien Grall wrote: Linux 4.4-rc5 doesn't build for arm64 with CONFIG_XEN=y enabled: In

Re: [PATCH] arm64: Add missing linux/bug.h include in asm/pgtable.h

2015-12-15 Thread James Morse
On 14/12/15 17:07, Catalin Marinas wrote: > If they take the mmdebug.h patch, it's even better. Please let us know > how that goes. Andrew Morton's Robot wrote: > The patch titled > Subject: include/linux/mmdebug.h: should include linux/bug.h > has been added to the -mm tree. Its filename i

Re: [PATCH] arm64: use raw_smp_processor_id in stack backtrace dump

2016-02-10 Thread James Morse
On 10/02/16 10:29, Will Deacon wrote: > On Tue, Feb 09, 2016 at 01:26:22PM -0800, Yang Shi wrote: >> dump_backtrace may be called in kthread context, which is not bound to a >> single >> cpu, i.e. khungtaskd, then calling smp_processor_id may trigger the below bug >> report: > > If we're preempti

Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist

2016-03-15 Thread James Morse
Hi David, On 09/03/16 05:32, David Long wrote: > From: "David A. Long" > diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S > index 4699cd7..0ac2131 100644 > --- a/arch/arm64/lib/copy_from_user.S > +++ b/arch/arm64/lib/copy_from_user.S > @@ -66,6 +66,7 @@ > .endm

Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist

2016-03-16 Thread James Morse
Hi Pratyush, On 16/03/16 05:43, Pratyush Anand wrote: > On 15/03/2016:06:47:52 PM, James Morse wrote: >> If I understand this correctly - you can't kprobe these ldr/str instructions >> as the fault handler wouldn't find kprobe's out-of line version of the >>

Re: [PATCH v11 3/9] arm64: add copy_to/from_user to kprobes blacklist

2016-03-18 Thread James Morse
Hi Pratyush, On 18/03/16 14:43, Pratyush Anand wrote: > On 18/03/2016:02:02:49 PM, James Morse wrote: >> In kernel/entry.S when entered from EL0 we test for TIF_SINGLESTEP in the >> thread_info flags, and use disable_step_tsk/enable_step_tsk to save/restore >> the

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-11 Thread James Morse
Hi Kees, On 06/04/16 20:44, Kees Cook wrote: > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, > one or the other must be chosen at boot-time. Until now, hibernation > was selected when no choice was made on the command line. > > To make the security benefits of kASLR more w

Re: [PATCH 5/5] arm64: Fix behavior of maxcpus=N

2016-04-07 Thread James Morse
Hi Suzuki, On 06/04/16 12:24, Suzuki K Poulose wrote: > maxcpu=n sets the number of CPUs activated at boot time to a max of n, > but allowing the remaining CPUs to be brought up later if the user > decides to do so. However, on arm64 due to various reasons, we disallowed > hotplugging CPUs beyond

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-12 Thread James Morse
On 11/04/16 19:03, Kees Cook wrote: > On Mon, Apr 11, 2016 at 1:00 AM, James Morse wrote: >> On 06/04/16 20:44, Kees Cook wrote: >>> When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, >>> one or the other must be chosen at boot-time. Until now, hibern

Re: [PATCH v1] arm64: allow building with kcov coverage on ARM64

2016-04-13 Thread James Morse
Hi Alex, On 12/04/16 12:17, Alexander Potapenko wrote: > I also wonder if we can, say, land the change to arch/arm64/Kconfig > separately from makefile changes that improve the precision or fix > certain build configurations. (I'm not sure what you mean by precision) It depends which build confi

[PATCH] kcov: Don't trace the code coverage code

2016-04-13 Thread James Morse
() so that ftrace won't try to patch this code. Signed-off-by: James Morse --- This patch lets arm64 with KCOV and STACK_TRACER boot. kernel/kcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kcov.c b/kernel/kcov.c index 3efbee0834a8..78bed7125515 100644 ---

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-09 Thread James Morse
Hi Jungseok, On 07/10/15 16:28, Jungseok Lee wrote: > Currently, a call trace drops a process stack walk when a separate IRQ > stack is used. It makes a call trace information much less useful when > a system gets paniked in interrupt context. panicked > This patch addresses the issue with the f

Re: [PATCH v6 2/3] percpu: add PERCPU_ATOM_SIZE for a generic percpu area setup

2015-11-03 Thread James Morse
Hi Jungseok, On 03/11/15 13:49, Jungseok Lee wrote: > Additionally, I've been thinking of do_softirq_own_stack() which is your > another comment [3]. Recently, I've realized there is possibility that > I misunderstood your intention. Did you mean that irq_handler hook is not > enough? Should do_so

Re: [PATCH v3 07/17] arm64, hibernate: move page handling function to new trans_pgd.c

2019-09-06 Thread James Morse
Hi Pavel, On 21/08/2019 19:31, Pavel Tatashin wrote: > Now, that we abstracted the required functions move them to a new home. > Later, we will generalize these function in order to be useful outside > of hibernation. > diff --git a/arch/arm64/mm/trans_pgd.c b/arch/arm64/mm/trans_pgd.c > new file

Re: [PATCH v5 1/4] dt-bindings: EDAC: Add Amazon's Annapurna Labs L1 EDAC

2019-09-06 Thread James Morse
Hi Rob, On 30/08/2019 22:50, Rob Herring wrote: > So KVM provides a semi-CortexA57? Code that runs on real h/w won't as a guest. KVM provides the architectural bits of Cortex-A57's EL1, when running on A57. Code that depends on EL2, won't run as a guest. Code that depends on some non-architectur

Re: [PATCH v5 1/4] dt-bindings: EDAC: Add Amazon's Annapurna Labs L1 EDAC

2019-08-30 Thread James Morse
Hi guys, On 27/08/2019 14:49, Rob Herring wrote: > On Mon, Aug 26, 2019 at 9:49 AM Hawa, Hanna wrote: >> On 8/21/2019 10:17 PM, Rob Herring wrote: >>> Why is this even in DT? AFAICT, this is all just CortexA57 core features >>> (i.e. nothing Amazon specific). The core type and the ECC capabilitie

Re: [PATCH RFC 0/4] ACPI: APEI: Add support to notify the vendor specific HW errors

2019-08-21 Thread James Morse
Hi, On 12/08/2019 11:11, Shiju Jose wrote: > Presently kernel does not support reporting the vendor specific HW errors, > in the non-standard format, to the vendor drivers for the recovery. 'non standard' here is probably a little jarring to the casual reader. You're referring to the UEFI spec's

Re: [PATCH RFC 2/4] ACPI: APEI: Add ghes_handle_memory_failure to the new notification method

2019-08-21 Thread James Morse
Hi, On 12/08/2019 11:11, Shiju Jose wrote: > This patch adds ghes_handle_memory_failure to the new error > notification method. The commit message doesn't answer the question: why? The existing code works. This just looks like additional churn. Given a user, I think the vendor specific example i

Re: [PATCH RFC 1/4] ACPI: APEI: Add support to notify the vendor specific HW errors

2019-08-21 Thread James Morse
Hi, On 12/08/2019 11:11, Shiju Jose wrote: > Presently the vendor specific HW errors, in the non-standard format, > are not reported to the vendor drivers for the recovery. > > This patch adds support to notify the vendor specific HW errors to the > registered kernel drivers. > diff --git a/driv

Re: [PATCH RFC 0/4] ACPI: APEI: Add support to notify the vendor specific HW errors

2019-10-03 Thread James Morse
Hi Shiju, On 22/08/2019 17:56, Shiju Jose wrote: > James Morse wrote: >> On 12/08/2019 11:11, Shiju Jose wrote: >>> Presently kernel does not support reporting the vendor specific HW >>> errors, in the non-standard format, to the vendor drivers for the recovery. &

Re: [PATCH v2 2/2] EDAC: al-mc-edac: Introduce Amazon's Annapurna Labs Memory Controller EDAC

2019-09-18 Thread James Morse
Hi Talel, On 15/09/2019 07:43, Talel Shenhar wrote: > The Amazon's Annapurna Labs Memory Controller EDAC supports ECC capability > for error detection and correction (Single bit error correction, Double > detection). This driver introduces EDAC driver for that capability. Is there any documentati

Re: [UNVERIFIED SENDER] Re: [UNVERIFIED SENDER] Re: [PATCH v2 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver

2019-09-19 Thread James Morse
Hi guys, On 12/09/2019 10:19, Shenhar, Talel wrote: > On 9/12/2019 11:50 AM, Marc Zyngier wrote: >> On Thu, 12 Sep 2019 07:50:03 +0100, >> "Shenhar, Talel" wrote: >>> On 9/11/2019 5:15 PM, Marc Zyngier wrote: On Tue, 10 Sep 2019 20:05:09 +0100, Talel Shenhar wrote: > +    if (!FIEL

Re: [PATCH RFC 2/4] arm64: mm: Add RAS extension system register check to SEA handling

2019-07-17 Thread James Morse
Hi Tyler, On 11/07/2019 05:14, Tyler Baicar OS wrote: > On Tue, Jul 9, 2019 at 8:52 PM Tyler Baicar OS > wrote: >> On Mon, Jul 8, 2019 at 10:10 AM James Morse wrote: >>> On 02/07/2019 17:51, Tyler Baicar OS wrote: >>>> @@ -632,6 +633,8 @@ static int do_sea

Re: [PATCH] firmware: arm_sdei: remove unused interfaces

2020-05-04 Thread James Morse
Hi Christoph, (CC: +Xiongfeng) Thanks for the reminder - I was just searching for who was using this. On 04/05/2020 17:42, Christoph Hellwig wrote: > The export symbols to register/unregister and enable/disable events > aren't ever used outside of arm_sdei.c, so mark them static. Xiongfeng, you

[PATCH v2 00/10] x86/resctrl: Misc cleanup

2020-04-30 Thread James Morse
1], I've picked up all the review feedback and collected the tags. Nothing in this series should change any behaviour. This series is based on v5.7-rc3. Thanks, James [v1] https://lore.kernel.org/lkml/20200214182401.39008-1-james.mo...@arm.com/ James Morse (10): x86/resctrl: Nothing u

[PATCH v2 09/10] x86/resctrl: Add arch_has_sparse_bitmaps to explain AMD/Intel CAT difference

2020-04-30 Thread James Morse
perty arch_has_sparse_bitmaps. Test this around the 'non-consecutive' test in cbm_validate(). Merging the validate calls causes AMD top gain the min_cbm_bits test needed for Haswell, but as it always sets this value to 1, it will never match. CC: Babu Moger Signed-off-by: James Morse Reviewed-by:

[PATCH v2 01/10] x86/resctrl: Nothing uses struct mbm_state chunks_bw

2020-04-30 Thread James Morse
Nothing reads struct mbm_states's chunks_bw value, its a copy of chunks. Remove it. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/internal.h | 2 -- arch/x86/kernel/cpu/resctrl/monitor.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-)

[PATCH v2 08/10] x86/resctrl: Merge AMD/Intel parse_bw() calls

2020-04-30 Thread James Morse
Removing this duplication means user-space visible behaviour and error messages are not validated or generated in different places. CC: Babu Moger Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 3 +- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 57 +--

[PATCH v2 05/10] x86/resctrl: Include pid.h

2020-04-30 Thread James Morse
We are about to disturb the header soup. This header uses struct pid and struct pid_namespace. Include their header. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- include/linux/resctrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/resctrl.h b/include/linux

[PATCH v2 10/10] cacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file

2020-04-30 Thread James Morse
intel_cacheinfo.c, name it get_cpu_cacheinfo_id() to show its relation with get_cpu_cacheinfo(). Now this is visible on other architectures, check the id attribute has actually been set. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 17 ++--- include/linux

[PATCH v2 06/10] x86/resctrl: Use is_closid_match() in more places

2020-04-30 Thread James Morse
is harmless as rdtgroup_mkdir() tests these capable flags before allowing the config directories to be created. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 30 -- 1 file changed, 14 insertions(+), 16 deletions

[PATCH v2 04/10] x86/resctrl: use container_of() in delayed_work handlers

2020-04-30 Thread James Morse
mbm_handle_overflow() and cqm_handle_limbo() are both provided with the domain's work_struct when called, but use get_domain_from_cpu() to find the domain, along with the appropriate error handling. container_of() saves some list walking and bitmap testing, use that instead. Signed-off-by:

[PATCH v2 03/10] x86/resctrl: Fix stale comment

2020-04-30 Thread James Morse
The comment in rdtgroup_init() refers to the non existent function rdt_mount(), which has now been renamed rdt_get_tree(). Fix the comment. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 02/10] x86/resctrl: Remove max_delay

2020-04-30 Thread James Morse
max_delay is used by x86's __get_mem_config_intel() as a local variable. Remove it, replacing it with a local variable. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/core.c | 8 arch/x86/kernel/cpu/resctrl/internal.h | 3 --- 2

[PATCH v2 07/10] x86/resctrl: Add arch_needs_linear to explain AMD/Intel MBA difference

2020-04-30 Thread James Morse
mains" error message for affected platforms. CC: Babu Moger Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- An alternative to this is for Intel non-linear MBA resources to clear alloc_capable as they can't be configured anyway. --- arch/x86/kernel/cpu/resctrl/core.c

Re: [PATCH v6 1/2] dt-bindings: edac: arm-dmc520.txt

2019-10-23 Thread James Morse
Hi Lei, On 21/10/2019 18:36, Lei Wang wrote: >> It looks like your patches didn't make it to the mailing list: >> https://lore.kernel.org/r/by5pr04mb6599eaa659a53b2331cb812586...@by5pr04mb6599.namprd04.prod.outlook.com >> >> You can search on https://lore.kernel.org/linux-edac/, I can only see the

Re: ARM Juno r1 + CONFIG_PROVE_LOCKING=y => boot failure

2019-10-11 Thread James Morse
Hi guys, On 11/10/2019 11:05, Sudeep Holla wrote: > On Fri, Oct 11, 2019 at 11:26:04AM +0200, Marek Szyprowski wrote: >> Recently I've got access to ARM Juno R1 board and did some tests with >> current mainline kernel on it. I'm a bit surprised that enabling >> CONFIG_PROVE_LOCKING causes a boot f

Re: [PATCH v6 14/17] arm64: kexec: move relocation function setup and clean up

2019-10-11 Thread James Morse
Hi Pavel, On 04/10/2019 19:52, Pavel Tatashin wrote: > Currently, kernel relocation function is configured in machine_kexec() > at the time of kexec reboot by using control_code_page. > > This operation, however, is more logical to be done during kexec_load, > and thus remove from reboot time. Mo

Re: [PATCH v9 03/18] arm64: trans_pgd: make trans_pgd_map_page generic

2020-04-29 Thread James Morse
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > kexec is going to use a different allocator, so make > trans_pgd_map_page to accept allocator as an argument, and also > kexec is going to use a different map protection, so also pass > it via argument. This trans_pgd_map_page() used to be c

Re: [PATCH v9 01/18] arm64: kexec: make dtb_mem always enabled

2020-04-29 Thread James Morse
not used, it is NULL. > Change the dtb_mem to phys_addr_t, as it is a physical address. Regardless, Reviewed-by: James Morse Thanks, James

Re: [PATCH v9 02/18] arm64: hibernate: move page handling function to new trans_pgd.c

2020-04-29 Thread James Morse
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > Now, that we abstracted the required functions move them to a new home. > Later, we will generalize these function in order to be useful outside > of hibernation. Reviewed-by: James Morse Thanks, James

Re: [PATCH v9 05/18] arm64: trans_pgd: pass NULL instead of init_mm to *_populate functions

2020-04-29 Thread James Morse
_populate() helpers don't use the mm parameter, so it doesn't make any difference. This was originally done so that if we ever needed anything from the mm, we didn't get a NULL dereference or EL0 behaviour due to a future '!= &init_mm'. If you think it matters, Acked-by: James Morse Thanks, James

Re: [PATCH v9 07/18] arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines

2020-04-29 Thread James Morse
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > From: James Morse > > To resume from hibernate, the contents of memory are restored from > the swap image. This may overwrite any page, including the running > kernel and its page tables. > > Hibernate copies the c

Re: [PATCH v9 04/18] arm64: trans_pgd: pass allocator trans_pgd_create_copy

2020-04-29 Thread James Morse
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > Make trans_pgd_create_copy and its subroutines to use allocator that is > passed as an argument Reviewed-by: James Morse Thanks, James

Re: [PATCH v9 10/18] arm64: kexec: cpu_soft_restart change argument types

2020-04-29 Thread James Morse
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote: > Change argument types from unsigned long to a more descriptive > phys_addr_t. For 'entry', which is a physical addresses, sure... > diff --git a/arch/arm64/kernel/cpu-reset.h b/arch/arm64/kernel/cpu-reset.h > index ed50e9587ad8..38cbd4068019

Re: [PATCH v9 08/18] arm64: kexec: move relocation function setup

2020-04-29 Thread James Morse
Keeping it next to the modification makes it clearer why it is required. In this case we can use flush_icache_range() instead of its __variant because this now happens much earlier. > + return 0; > +} Regardless, Reviewed-by: James Morse Thanks, James

Re: [PATCH v9 09/18] arm64: kexec: call kexec_image_info only once

2020-04-29 Thread James Morse
ith copy of arm64_relocate_new_kernel is known. Sure, keep the earlier version that is more likely to be seen. Acked-by: James Morse Thanks, James

Re: ARM Juno r1 + CONFIG_PROVE_LOCKING=y => boot failure

2019-10-14 Thread James Morse
Holla wrote: >>>>> On Fri, Oct 11, 2019 at 03:02:42PM +0200, Marek Szyprowski wrote: >>>>>> On 11.10.2019 12:38, James Morse wrote: >>>>>>> On 11/10/2019 11:05, Sudeep Holla wrote: >>>>>>>> On Fri, Oct 11, 2019 at 11:26:04

<    1   2   3   4   5   6   7   8   >