Re: [PATCH v1 2/2] arm64: handle NOTIFY_SEI notification by the APEI driver

2018-06-15 Thread James Morse
Hi gengdongjiu, On 01/06/18 08:21, gengdongjiu wrote: > On 2018/6/1 0:51, James Morse wrote: >> On 31/05/18 12:01, Mark Rutland wrote: >>> In do_serror() we already handle nmi_{enter,exit}(), so there's no need >>> for that here. >> >> Even

Re: [PATCH v1 2/2] arm64: handle NOTIFY_SEI notification by the APEI driver

2018-06-15 Thread James Morse
Hi gengdongjiu, On 01/06/18 08:21, gengdongjiu wrote: > On 2018/6/1 0:51, James Morse wrote: >> On 31/05/18 12:01, Mark Rutland wrote: >>> In do_serror() we already handle nmi_{enter,exit}(), so there's no need >>> for that here. >> >> Even

Re: [PATCH v3 3/3] arm64/mm: migrate swapper_pg_dir and tramp_pg_dir

2018-06-13 Thread James Morse
Hi Jun, On 06/06/18 05:39, Jun Yao wrote: > Migrate swapper_pg_dir and tramp_pg_dir. And their virtual addresses > do not correlate with kernel's address. This is all to make 'KSMA' harder, where an single arbitrary write is used to add a block mapping to the page-tables, giving the attacker

Re: [PATCH v3 3/3] arm64/mm: migrate swapper_pg_dir and tramp_pg_dir

2018-06-13 Thread James Morse
Hi Jun, On 06/06/18 05:39, Jun Yao wrote: > Migrate swapper_pg_dir and tramp_pg_dir. And their virtual addresses > do not correlate with kernel's address. This is all to make 'KSMA' harder, where an single arbitrary write is used to add a block mapping to the page-tables, giving the attacker

Re: [PATCH RESEND v4 2/2] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-06-11 Thread James Morse
Hi Dongjiu Geng, Please only put 'RESEND' in the subject if the patch content is identical. This patch is not the same as v4. On 08/06/18 20:48, Dongjiu Geng wrote: > For the migrating VMs, user space may need to know the exception > state. For example, in the machine A, KVM make an SError

Re: [PATCH RESEND v4 2/2] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-06-11 Thread James Morse
Hi Dongjiu Geng, Please only put 'RESEND' in the subject if the patch content is identical. This patch is not the same as v4. On 08/06/18 20:48, Dongjiu Geng wrote: > For the migrating VMs, user space may need to know the exception > state. For example, in the machine A, KVM make an SError

Re: [PATCH RESEND v4 2/2] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-06-11 Thread James Morse
Hi Dongjiu Geng, On 09/06/18 13:40, Marc Zyngier wrote: > On Fri, 08 Jun 2018 20:48:40 +0100, Dongjiu Geng wrote: >> For the migrating VMs, user space may need to know the exception >> state. For example, in the machine A, KVM make an SError pending, >> when migrate to B, KVM also needs to pend

Re: [PATCH RESEND v4 2/2] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-06-11 Thread James Morse
Hi Dongjiu Geng, On 09/06/18 13:40, Marc Zyngier wrote: > On Fri, 08 Jun 2018 20:48:40 +0100, Dongjiu Geng wrote: >> For the migrating VMs, user space may need to know the exception >> state. For example, in the machine A, KVM make an SError pending, >> when migrate to B, KVM also needs to pend

Re: How to print stack uses of IRQ in ARM64

2018-06-05 Thread James Morse
Hi Vishun, (CC: +linux-arm-kernel list) On 05/06/18 14:12, Andy Shevchenko wrote: > On Thu, May 31, 2018 at 1:01 PM, Vishnu Motghare > wrote: >> My understanding is each CPU getting its own IRQ stack. So is it >> possible to print the stack uses of each IRQ handler? The stacks are per-cpu not

Re: How to print stack uses of IRQ in ARM64

2018-06-05 Thread James Morse
Hi Vishun, (CC: +linux-arm-kernel list) On 05/06/18 14:12, Andy Shevchenko wrote: > On Thu, May 31, 2018 at 1:01 PM, Vishnu Motghare > wrote: >> My understanding is each CPU getting its own IRQ stack. So is it >> possible to print the stack uses of each IRQ handler? The stacks are per-cpu not

Re: [PATCH 1/4] arm64/mm: pass swapper_pg_dir as an argument to __enable_mmu()

2018-06-01 Thread James Morse
Hi Jun Yao, On 01/06/18 09:08, Jun Yao wrote: > Introduce __pa_swapper_pg_dir to save physical address of > swapper_pg_dir. And pass it as an argument to __enable_mmu(). > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S > index b0853069702f..e3bb44b4b6c6 100644 > ---

Re: [PATCH 1/4] arm64/mm: pass swapper_pg_dir as an argument to __enable_mmu()

2018-06-01 Thread James Morse
Hi Jun Yao, On 01/06/18 09:08, Jun Yao wrote: > Introduce __pa_swapper_pg_dir to save physical address of > swapper_pg_dir. And pass it as an argument to __enable_mmu(). > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S > index b0853069702f..e3bb44b4b6c6 100644 > ---

Re: [PATCH v1 2/2] arm64: handle NOTIFY_SEI notification by the APEI driver

2018-05-31 Thread James Morse
Hi Mark, Dongjiu Geng, On 31/05/18 12:01, Mark Rutland wrote: > In do_serror() we already handle nmi_{enter,exit}(), so there's no need > for that here. Even better: nmi_enter() has a BUG_ON(in_nmi()). > TBH, I don't understand why do_sea() does that conditionally today. > Unless there's some

Re: [PATCH v1 2/2] arm64: handle NOTIFY_SEI notification by the APEI driver

2018-05-31 Thread James Morse
Hi Mark, Dongjiu Geng, On 31/05/18 12:01, Mark Rutland wrote: > In do_serror() we already handle nmi_{enter,exit}(), so there's no need > for that here. Even better: nmi_enter() has a BUG_ON(in_nmi()). > TBH, I don't understand why do_sea() does that conditionally today. > Unless there's some

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 11:39, AKASHI Takahiro wrote: > On Tue, May 15, 2018 at 06:11:15PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> Enabling crash dump (kdump) includes >>> * prepare contents of ELF header of a core dump file

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 11:39, AKASHI Takahiro wrote: > On Tue, May 15, 2018 at 06:11:15PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> Enabling crash dump (kdump) includes >>> * prepare contents of ELF header of a core dump file

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 08:42, AKASHI Takahiro wrote: > On Fri, May 18, 2018 at 04:11:35PM +0900, AKASHI Takahiro wrote: >> On Tue, May 15, 2018 at 05:20:00PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> diff --git a/arch/arm64/kerne

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 08:42, AKASHI Takahiro wrote: > On Fri, May 18, 2018 at 04:11:35PM +0900, AKASHI Takahiro wrote: >> On Tue, May 15, 2018 at 05:20:00PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> diff --git a/arch/arm64/kerne

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-17 Thread James Morse
Hi Baoquan, On 17/05/18 03:15, Baoquan He wrote: > On 05/17/18 at 10:10am, Baoquan He wrote: >> On 05/07/18 at 02:59pm, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-17 Thread James Morse
Hi Baoquan, On 17/05/18 03:15, Baoquan He wrote: > On 05/17/18 at 10:10am, Baoquan He wrote: >> On 05/07/18 at 02:59pm, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 06:13, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:07:06PM +0100, James Morse wrote: >> On 07/05/18 08:21, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Ta

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 06:13, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:07:06PM +0100, James Morse wrote: >> On 07/05/18 08:21, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Ta

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi guys, (CC: +RobH, devicetree list) On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties,

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi guys, (CC: +RobH, devicetree list) On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties,

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties, "linux,usable-memory-range" and >

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties, "linux,usable-memory-range" and >

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > load_other_segments() is expected to allocate and place all the necessary > memory segments other than kernel, including initrd and device-tree > blob (and elf core header for crash). > While most of the code was borrowed from kexec-tools'

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > load_other_segments() is expected to allocate and place all the necessary > memory segments other than kernel, including initrd and device-tree > blob (and elf core header for crash). > While most of the code was borrowed from kexec-tools'

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:35, AKASHI Takahiro wrote: > On Mon, May 07, 2018 at 02:59:07PM +0900, AKASHI Takahiro wrote: >> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> We need to prevent fi

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:35, AKASHI Takahiro wrote: > On Mon, May 07, 2018 at 02:59:07PM +0900, AKASHI Takahiro wrote: >> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> We need to prevent fi

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:45, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:03:49PM +0100, James Morse wrote: >> On 07/05/18 06:22, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:45, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:03:49PM +0100, James Morse wrote: >> On 07/05/18 06:22, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 08:21, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> This patch provides kexec_file_ops for "Image"-format kernel. In this >>> implementation, a

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 08:21, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> This patch provides kexec_file_ops for "Image"-format kernel. In this >>> implementation, a

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 06:22, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> diff --git a/arch/arm64/kernel/machine_kexec.c >>> b/arch/arm64/kernel/machine_kexec.c >>> ind

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 06:22, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> diff --git a/arch/arm64/kernel/machine_kexec.c >>> b/arch/arm64/kernel/machine_kexec.c >>> ind

Re: [PATCH v2 11/17] kvm: arm64: Configure VTCR per VM

2018-05-03 Thread James Morse
Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: > We set VTCR_EL2 very early during the stage2 init and don't > touch it ever. This is fine as we had a fixed IPA size. This > patch changes the behavior to set the VTCR for a given VM, > depending on its stage2 table. The common configuration

Re: [PATCH v2 11/17] kvm: arm64: Configure VTCR per VM

2018-05-03 Thread James Morse
Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: > We set VTCR_EL2 very early during the stage2 init and don't > touch it ever. This is fine as we had a fixed IPA size. This > patch changes the behavior to set the VTCR for a given VM, > depending on its stage2 table. The common configuration

Re: [PATCH v2 05/17] arm64: Helper for parange to PASize

2018-05-03 Thread James Morse
Hi Suzuki, Nit: KVM in the subject line? On 27/03/18 14:15, Suzuki K Poulose wrote: > Add a helper to convert ID_AA64MMFR0_EL1:PARange to they physical > size shift. Limit the size to the maximum supported by the kernel. > We are about to move the user of this code and this helps to > keep the

Re: [PATCH v2 05/17] arm64: Helper for parange to PASize

2018-05-03 Thread James Morse
Hi Suzuki, Nit: KVM in the subject line? On 27/03/18 14:15, Suzuki K Poulose wrote: > Add a helper to convert ID_AA64MMFR0_EL1:PARange to they physical > size shift. Limit the size to the maximum supported by the kernel. > We are about to move the user of this code and this helps to > keep the

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > We need to prevent firmware-reserved memory regions, particularly EFI > memory map as well as ACPI tables, from being corrupted by loading > kernel/initrd (or other kexec buffers). We also want to support memory > allocation in top-down

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > We need to prevent firmware-reserved memory regions, particularly EFI > memory map as well as ACPI tables, from being corrupted by loading > kernel/initrd (or other kexec buffers). We also want to support memory > allocation in top-down

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > On arm64, purugatory would do almosty nothing. So just invoke secondary > kernel directy by jumping into its entry code. (Nits: purgatory, almost, directly) > While, in this case, cpu_soft_restart() must be called with dtb address > in the

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > On arm64, purugatory would do almosty nothing. So just invoke secondary > kernel directy by jumping into its entry code. (Nits: purgatory, almost, directly) > While, in this case, cpu_soft_restart() must be called with dtb address > in the

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > This patch provides kexec_file_ops for "Image"-format kernel. In this > implementation, a binary is always loaded with a fixed offset identified > in text_offset field of its header. > diff --git a/arch/arm64/include/asm/kexec.h

Re: [PATCH v9 02/11] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Change this function from static to global so that arm64 can implement > its own arch_kimage_file_post_load_cleanup() later using > kexec_image_post_load_cleanup_default(). Do we need to call kexec_image_post_load_cleanup_default()? All it

Re: [PATCH v9 02/11] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Change this function from static to global so that arm64 can implement > its own arch_kimage_file_post_load_cleanup() later using > kexec_image_post_load_cleanup_default(). Do we need to call kexec_image_post_load_cleanup_default()? All it

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > This patch provides kexec_file_ops for "Image"-format kernel. In this > implementation, a binary is always loaded with a fixed offset identified > in text_offset field of its header. > diff --git a/arch/arm64/include/asm/kexec.h

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-20 Thread James Morse
Hi Alex, On 04/16/2018 10:59 PM, Alex G. wrote: > On 04/13/2018 11:38 AM, James Morse wrote: >> This assumes a cache-invalidate will clear the error, which I don't think we're >> guaranteed on arm. >> It also destroys any adjacent data, "everyone's happy" i

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-20 Thread James Morse
Hi Alex, On 04/16/2018 10:59 PM, Alex G. wrote: > On 04/13/2018 11:38 AM, James Morse wrote: >> This assumes a cache-invalidate will clear the error, which I don't think we're >> guaranteed on arm. >> It also destroys any adjacent data, "everyone's happy" i

Re: [RFC PATCH v2 3/4] acpi: apei: Do not panic() when correctable errors are marked as fatal.

2018-04-19 Thread James Morse
Hi Alex, (I haven't read through all this yet, just on this one:) On 04/19/2018 03:57 PM, Alex G. wrote: > Maybe it's better move the AER handling to NMI/IRQ context, since > ghes_handle_aer() is only scheduling the real AER andler, and is irq > safe. I'm scratching my head about why we're

Re: [RFC PATCH v2 3/4] acpi: apei: Do not panic() when correctable errors are marked as fatal.

2018-04-19 Thread James Morse
Hi Alex, (I haven't read through all this yet, just on this one:) On 04/19/2018 03:57 PM, Alex G. wrote: > Maybe it's better move the AER handling to NMI/IRQ context, since > ghes_handle_aer() is only scheduling the real AER andler, and is irq > safe. I'm scratching my head about why we're

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-13 Thread James Morse
Hi Alex, On 09/04/18 19:11, Alex G. wrote: > On 04/06/2018 01:24 PM, James Morse wrote: > Do you have any ETA on when your SEA patches are going to make it > upstream? There's not much point in updating my patchset if it's going > to conflict with your work. The SE

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-13 Thread James Morse
Hi Alex, On 09/04/18 19:11, Alex G. wrote: > On 04/06/2018 01:24 PM, James Morse wrote: > Do you have any ETA on when your SEA patches are going to make it > upstream? There's not much point in updating my patchset if it's going > to conflict with your work. The SE

Re: [PATCH v9 3/7] acpi: apei: Add SEI notification type support for ARMv8

2018-04-12 Thread James Morse
Hi gengdongjiu, On 12/04/18 06:00, gengdongjiu wrote: > 2018-02-16 1:55 GMT+08:00 James Morse <james.mo...@arm.com>: >> On 05/02/18 11:24, gengdongjiu wrote: >>>> Is the emulated SError routed following the routing rules for HCR_EL2.{AMO, >>>> TGE}

Re: [PATCH v9 3/7] acpi: apei: Add SEI notification type support for ARMv8

2018-04-12 Thread James Morse
Hi gengdongjiu, On 12/04/18 06:00, gengdongjiu wrote: > 2018-02-16 1:55 GMT+08:00 James Morse : >> On 05/02/18 11:24, gengdongjiu wrote: >>>> Is the emulated SError routed following the routing rules for HCR_EL2.{AMO, >>>> TGE}? >>> >>> Yes, it

Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification

2018-04-12 Thread James Morse
Hi gengdongjiu, On 12/04/18 07:09, gengdongjiu wrote: > On 2018/4/10 22:15, James Morse wrote: >> On 09/04/18 22:36, Dongjiu Geng wrote: >>> 1. Detect whether KVM can set set guest SError syndrome >>> 2. Support to Set VSESR_EL2 and inject SError by user space. &g

Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification

2018-04-12 Thread James Morse
Hi gengdongjiu, On 12/04/18 07:09, gengdongjiu wrote: > On 2018/4/10 22:15, James Morse wrote: >> On 09/04/18 22:36, Dongjiu Geng wrote: >>> 1. Detect whether KVM can set set guest SError syndrome >>> 2. Support to Set VSESR_EL2 and inject SError by user space. &g

Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification

2018-04-10 Thread James Morse
Hi Dongjiu Geng, On 09/04/18 22:36, Dongjiu Geng wrote: > 1. Detect whether KVM can set set guest SError syndrome > 2. Support to Set VSESR_EL2 and inject SError by user space. > 3. Support live migration to keep SError pending state and VSESR_EL2 value. > 4. ACPI 6.1 adds support for NOTIFY_SEI

Re: [PATCH v11 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification

2018-04-10 Thread James Morse
Hi Dongjiu Geng, On 09/04/18 22:36, Dongjiu Geng wrote: > 1. Detect whether KVM can set set guest SError syndrome > 2. Support to Set VSESR_EL2 and inject SError by user space. > 3. Support live migration to keep SError pending state and VSESR_EL2 value. > 4. ACPI 6.1 adds support for NOTIFY_SEI

Re: [PATCH v11 2/4] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-04-10 Thread James Morse
Hi Dongjiu Geng, On 09/04/18 22:36, Dongjiu Geng wrote: > This new IOCTL exports user-invisible states related to SError. > Together with appropriate user space changes, it can inject > SError with specified syndrome to guest by setup kvm_vcpu_events > value. > Also it can support live

Re: [PATCH v11 2/4] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-04-10 Thread James Morse
Hi Dongjiu Geng, On 09/04/18 22:36, Dongjiu Geng wrote: > This new IOCTL exports user-invisible states related to SError. > Together with appropriate user space changes, it can inject > SError with specified syndrome to guest by setup kvm_vcpu_events > value. > Also it can support live

Re: [PATCH v11 1/4] arm64: KVM: export the capability to set guest SError syndrome

2018-04-10 Thread James Morse
efine KVM_CAP_ARM_INJECT_SERROR_ESR 153 > > #ifdef KVM_CAP_IRQ_ROUTING (patch 1&2 should probably be swapped around, as on its own this does thing). Reviewed-by: James Morse <james.mo...@arm.com> Thanks, James

Re: [PATCH v11 1/4] arm64: KVM: export the capability to set guest SError syndrome

2018-04-10 Thread James Morse
efine KVM_CAP_ARM_INJECT_SERROR_ESR 153 > > #ifdef KVM_CAP_IRQ_ROUTING (patch 1&2 should probably be swapped around, as on its own this does thing). Reviewed-by: James Morse Thanks, James

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-06 Thread James Morse
Hi Alex, On 04/04/18 20:49, Alex G. wrote: > On 04/04/2018 11:53 AM, James Morse wrote: >>>> How do we know we will survive this trip? >>> >>> We don't. >> >> Isn't that even worse than panic()ing? (No output, followed by a watchdog >> rebo

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-06 Thread James Morse
Hi Alex, On 04/04/18 20:49, Alex G. wrote: > On 04/04/2018 11:53 AM, James Morse wrote: >>>> How do we know we will survive this trip? >>> >>> We don't. >> >> Isn't that even worse than panic()ing? (No output, followed by a watchdog >> rebo

Re: [PATCH 1/5] arm64: entry: isb in el1_irq

2018-04-06 Thread James Morse
Hi Mark, On 06/04/18 18:22, Mark Rutland wrote: > Digging a bit, I also thing that our ct_user_exit and ct_user_enter > usage is on dodgy ground today. [...] > I think similar applies to SDEI; we don't negotiate with RCU prior to > invoking handlers, which might need RCU. The arch code's

Re: [PATCH 1/5] arm64: entry: isb in el1_irq

2018-04-06 Thread James Morse
Hi Mark, On 06/04/18 18:22, Mark Rutland wrote: > Digging a bit, I also thing that our ct_user_exit and ct_user_enter > usage is on dodgy ground today. [...] > I think similar applies to SDEI; we don't negotiate with RCU prior to > invoking handlers, which might need RCU. The arch code's

Re: [PATCH 3/5] arm64: early ISB at exit from extended quiescent state

2018-04-06 Thread James Morse
Hi Yury, On 05/04/18 18:17, Yury Norov wrote: > This series enables delaying of kernel memory synchronization > for CPUs running in extended quiescent state (EQS) till the exit > of that state. > > ARM64 uses IPI mechanism to notify all cores in SMP system that > kernel text is changed; and IPI

Re: [PATCH 3/5] arm64: early ISB at exit from extended quiescent state

2018-04-06 Thread James Morse
Hi Yury, On 05/04/18 18:17, Yury Norov wrote: > This series enables delaying of kernel memory synchronization > for CPUs running in extended quiescent state (EQS) till the exit > of that state. > > ARM64 uses IPI mechanism to notify all cores in SMP system that > kernel text is changed; and IPI

Re: [PATCH 1/5] arm64: entry: isb in el1_irq

2018-04-06 Thread James Morse
Hi Yury, On 05/04/18 18:17, Yury Norov wrote: > Kernel text patching framework relies on IPI to ensure that other > SMP cores observe the change. Target core calls isb() in IPI handler (Odd, if its just to synchronize the CPU, taking the IPI should be enough). > path, but not at the beginning

Re: [PATCH 1/5] arm64: entry: isb in el1_irq

2018-04-06 Thread James Morse
Hi Yury, On 05/04/18 18:17, Yury Norov wrote: > Kernel text patching framework relies on IPI to ensure that other > SMP cores observe the change. Target core calls isb() in IPI handler (Odd, if its just to synchronize the CPU, taking the IPI should be enough). > path, but not at the beginning

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-04 Thread James Morse
Hi Alex, On 04/04/18 16:33, Alex G. wrote: > On 04/04/2018 02:18 AM, James Morse wrote: >> On 03/04/18 18:08, Alexandru Gagniuc wrote: >>> BIOSes like to send NMIs for a number of silly reasons often deemed >>> to be "fatal". For example pin bounce during

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-04 Thread James Morse
Hi Alex, On 04/04/18 16:33, Alex G. wrote: > On 04/04/2018 02:18 AM, James Morse wrote: >> On 03/04/18 18:08, Alexandru Gagniuc wrote: >>> BIOSes like to send NMIs for a number of silly reasons often deemed >>> to be "fatal". For example pin bounce during

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-04 Thread James Morse
Hi Alexandru, On 03/04/18 18:08, Alexandru Gagniuc wrote: > BIOSes like to send NMIs for a number of silly reasons often deemed > to be "fatal". For example pin bounce during a PCIE hotplug/unplug > might cause the link to go down and retrain, with fatal PCI errors > being generated while the

Re: [RFC PATCH 3/4] acpi: apei: Do not panic() in NMI because of GHES messages

2018-04-04 Thread James Morse
Hi Alexandru, On 03/04/18 18:08, Alexandru Gagniuc wrote: > BIOSes like to send NMIs for a number of silly reasons often deemed > to be "fatal". For example pin bounce during a PCIE hotplug/unplug > might cause the link to go down and retrain, with fatal PCI errors > being generated while the

Re: [PATCH v2 11/17] kvm: arm64: Configure VTCR per VM

2018-04-03 Thread James Morse
Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: > We set VTCR_EL2 very early during the stage2 init and don't > touch it ever. This is fine as we had a fixed IPA size. This > patch changes the behavior to set the VTCR for a given VM, > depending on its stage2 table. The common configuration

Re: [PATCH v2 11/17] kvm: arm64: Configure VTCR per VM

2018-04-03 Thread James Morse
Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: > We set VTCR_EL2 very early during the stage2 init and don't > touch it ever. This is fine as we had a fixed IPA size. This > patch changes the behavior to set the VTCR for a given VM, > depending on its stage2 table. The common configuration

Re: [PATCH v9 5/7] arm64: kvm: Introduce KVM_ARM_SET_SERROR_ESR ioctl

2018-03-15 Thread James Morse
Hi gengdongjiu, On 08/03/18 06:18, gengdongjiu wrote: > Hi James, >sorry for my late response due to chines new year. Happy new year, > 2018-02-16 1:55 GMT+08:00 James Morse <james.mo...@arm.com>: >> On 12/02/18 10:19, gengdongjiu wrote: >>> On 201

Re: [PATCH v9 5/7] arm64: kvm: Introduce KVM_ARM_SET_SERROR_ESR ioctl

2018-03-15 Thread James Morse
Hi gengdongjiu, On 08/03/18 06:18, gengdongjiu wrote: > Hi James, >sorry for my late response due to chines new year. Happy new year, > 2018-02-16 1:55 GMT+08:00 James Morse : >> On 12/02/18 10:19, gengdongjiu wrote: >>> On 2018/2/10 1:44, James Morse wrote: >&

Re: [PATCH v10 2/5] arm64: KVM: export the capability to set guest SError syndrome

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > Before user space injects a SError, it needs to know whether it can > specify the guest Exception Syndrome, so KVM should tell user space > whether it has such capability. > diff --git a/Documentation/virtual/kvm/api.txt >

Re: [PATCH v10 2/5] arm64: KVM: export the capability to set guest SError syndrome

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > Before user space injects a SError, it needs to know whether it can > specify the guest Exception Syndrome, so KVM should tell user space > whether it has such capability. > diff --git a/Documentation/virtual/kvm/api.txt >

Re: [PATCH v10 3/5] arm/arm64: KVM: Introduce set and get per-vcpu event

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > RAS Extension provides VSESR_EL2 register to specify > virtual SError syndrome value, this patch adds a new > IOCTL to export user-invisible states related to > SError exceptions. User space can setup the > kvm_vcpu_events to inject

Re: [PATCH v10 3/5] arm/arm64: KVM: Introduce set and get per-vcpu event

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > RAS Extension provides VSESR_EL2 register to specify > virtual SError syndrome value, this patch adds a new > IOCTL to export user-invisible states related to > SError exceptions. User space can setup the > kvm_vcpu_events to inject

Re: [PATCH v10 1/5] arm64: KVM: Prepare set virtual SEI syndrome value

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > Export one API to specify virtual SEI syndrome value > for guest, and add a helper to get the VSESR_EL2 value. This patch adds two helpers that nothing calls... its not big, please merge it with the patch that uses these. > diff --git

Re: [PATCH v10 1/5] arm64: KVM: Prepare set virtual SEI syndrome value

2018-03-15 Thread James Morse
Hi Dongjiu Geng, On 03/03/18 16:09, Dongjiu Geng wrote: > Export one API to specify virtual SEI syndrome value > for guest, and add a helper to get the VSESR_EL2 value. This patch adds two helpers that nothing calls... its not big, please merge it with the patch that uses these. > diff --git

Re: [PATCH] arm64: rename the function arm64_is_ras_serror() to avoid confusion

2018-03-15 Thread James Morse
Hi gengdongjiu, On 26/02/18 16:13, gengdongjiu wrote: > 2018-02-24 1:58 GMT+08:00 James Morse <james.mo...@arm.com>: >> On 22/02/18 18:02, Dongjiu Geng wrote: >>> The RAS SError Syndrome can be Implementation-Defined, >>> arm64_is_ras_serror() is used

Re: [PATCH] arm64: rename the function arm64_is_ras_serror() to avoid confusion

2018-03-15 Thread James Morse
Hi gengdongjiu, On 26/02/18 16:13, gengdongjiu wrote: > 2018-02-24 1:58 GMT+08:00 James Morse : >> On 22/02/18 18:02, Dongjiu Geng wrote: >>> The RAS SError Syndrome can be Implementation-Defined, >>> arm64_is_ras_serror() is used to judge whether it is RAS SError,

Re: [PATCH RFC 1/2] drivers/edac: Add L1 and L2 error detection for A53 and A57

2018-03-15 Thread James Morse
Hi York, You have a DT binding in here, please CC the devicetree list. You're touching code under arch/arm64, so you need the arm list too. get_maintainer.pl will take your patch and give you the list of which lists and maintainers to CC. (I've added those lists, the full patch is here:

Re: [PATCH RFC 1/2] drivers/edac: Add L1 and L2 error detection for A53 and A57

2018-03-15 Thread James Morse
Hi York, You have a DT binding in here, please CC the devicetree list. You're touching code under arch/arm64, so you need the arm list too. get_maintainer.pl will take your patch and give you the list of which lists and maintainers to CC. (I've added those lists, the full patch is here:

Re: [PATCH] arm64: rename the function arm64_is_ras_serror() to avoid confusion

2018-02-23 Thread James Morse
Hi Dongjiu Geng, On 22/02/18 18:02, Dongjiu Geng wrote: > The RAS SError Syndrome can be Implementation-Defined, > arm64_is_ras_serror() is used to judge whether it is RAS SError, > but arm64_is_ras_serror() does not include this judgement. In order > to avoid function name confusion, we rename

Re: [PATCH] arm64: rename the function arm64_is_ras_serror() to avoid confusion

2018-02-23 Thread James Morse
Hi Dongjiu Geng, On 22/02/18 18:02, Dongjiu Geng wrote: > The RAS SError Syndrome can be Implementation-Defined, > arm64_is_ras_serror() is used to judge whether it is RAS SError, > but arm64_is_ras_serror() does not include this judgement. In order > to avoid function name confusion, we rename

Re: [PATCH v9 5/7] arm64: kvm: Introduce KVM_ARM_SET_SERROR_ESR ioctl

2018-02-15 Thread James Morse
Hi gengdongjiu, On 12/02/18 10:19, gengdongjiu wrote: > On 2018/2/10 1:44, James Morse wrote: >> The point? We can't know what a CPU without the RAS extensions puts in there. >> >> Why Does this matter? When migrating a pending SError we have to know the >> differe

Re: [PATCH v9 5/7] arm64: kvm: Introduce KVM_ARM_SET_SERROR_ESR ioctl

2018-02-15 Thread James Morse
Hi gengdongjiu, On 12/02/18 10:19, gengdongjiu wrote: > On 2018/2/10 1:44, James Morse wrote: >> The point? We can't know what a CPU without the RAS extensions puts in there. >> >> Why Does this matter? When migrating a pending SError we have to know the >> differe

Re: [PATCH v5 1/3] arm64/ras: support sea error recovery

2018-02-15 Thread James Morse
<xiexi...@huawei.com> Signed-off-by: James Morse <james.mo...@arm.com> CC: Xie XiuQi <xiexi...@huawei.com> CC: gengdongjiu <gengdong...@huawei.com> --- mm/memory-failure.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mm/memory-failu

Re: [PATCH v5 1/3] arm64/ras: support sea error recovery

2018-02-15 Thread James Morse
Xie XiuQi Signed-off-by: James Morse CC: Xie XiuQi CC: gengdongjiu --- mm/memory-failure.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 4b80ccee4535..14f44d841e8b 100644 --- a/mm/memory-failure.c +++ b/mm/memory-fai

<    1   2   3   4   5   6   7   8   9   10   >