Re: RFC on Kdump and PCIe on ARM64

2018-03-02 Thread Sinan Kaya
On 3/2/2018 1:02 PM, Will Deacon wrote: >> How about the points that Baoquan highlighted in his email regarding the >> solution from AMD and X86? > Which specific points do you think this proposal doesn't address? > No specific concerns at this moment. >> I have not read the entire thread but,

Re: RFC on Kdump and PCIe on ARM64

2018-03-02 Thread Will Deacon
On Fri, Mar 02, 2018 at 09:12:29AM -0500, Sinan Kaya wrote: > On 3/2/2018 5:30 AM, Will Deacon wrote: > >> Do you really have to reset the IOMMU? Can you just give it new page > >> tables that start out with all IOVAs from all devices being invalid, > >> then add valid mappings as drivers need

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Dave Young
On 02/26/18 at 01:00pm, Michal Suchanek wrote: > Not all architectures implement KEXEC_FILE_LOAD. However, on some > archiectures KEXEC_FILE_LOAD is required when secure boot is enabled in > locked-down mode. Previously users had to select the KEXEC_FILE_LOAD > syscall with undocumented -s option.

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Dave Young
On 02/26/18 at 01:00pm, Michal Suchanek wrote: > Not all architectures implement KEXEC_FILE_LOAD. However, on some > archiectures KEXEC_FILE_LOAD is required when secure boot is enabled in > locked-down mode. Previously users had to select the KEXEC_FILE_LOAD > syscall with undocumented -s option.

Re: [PATCH makedumpfile] handle mem_section as either a pointer or an array

2018-03-02 Thread Thadeu Lima de Souza Cascardo
Any comments or reviews on the patch below? Thanks. Cascardo. On Mon, Feb 19, 2018 at 05:04:59PM -0300, Thadeu Lima de Souza Cascardo wrote: > Some kernel versions that have been recently shipped have mem_section point to > a pointer to the array, instead of pointing directly to the array. That

Re: RFC on Kdump and PCIe on ARM64

2018-03-02 Thread Will Deacon
On Thu, Mar 01, 2018 at 06:03:03PM -0600, Bjorn Helgaas wrote: > On Thu, Mar 01, 2018 at 02:19:09PM -0500, Sinan Kaya wrote: > > On 3/1/2018 2:05 PM, Bjorn Helgaas wrote: > > > On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > > >> Hi, > > >> > > >> We are seeing IOMMU faults when

Re: [PATCH v3 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Michal Suchánek
On Fri, 2 Mar 2018 14:33:02 +0100 Michal Suchanek wrote: > Not all architectures implement KEXEC_FILE_LOAD. However, on some > archiectures KEXEC_FILE_LOAD is required when secure boot is enabled > in locked-down mode. Previously users had to select the > KEXEC_FILE_LOAD

Re: RFC on Kdump and PCIe on ARM64

2018-03-02 Thread Sinan Kaya
Hi Will, On 3/2/2018 5:30 AM, Will Deacon wrote: >> Do you really have to reset the IOMMU? Can you just give it new page >> tables that start out with all IOVAs from all devices being invalid, >> then add valid mappings as drivers need them (presumably after the >> driver has done whatever it

Re: RFC on Kdump and PCIe on ARM64

2018-03-02 Thread Sinan Kaya
On 3/1/2018 7:03 PM, Bjorn Helgaas wrote: >> 3. The last one is adapter gets into fuzzy state due to not coming >> out of clean state in the second time init and being rejected by >> SMMUv3 multiple times. >> >> [ 16.093441] pci :01:00.0: aer_status: 0x0004, aer_mask: 0x >> [

Re: [RFC 0/2] kernel: add support to collect hardware logs in panic

2018-03-02 Thread Eric W. Biederman
Rahul Lakkireddy writes: > On production servers running variety of workloads over time, kernel > panic can happen sporadically after days or even months. It is > important to collect as much debug logs as possible to root cause > and fix the problem, that may not

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Michal Suchánek
On Fri, 2 Mar 2018 13:46:10 +0100 Simon Horman wrote: > On Fri, Mar 02, 2018 at 01:32:52PM +0100, Michal Suchánek wrote: > > On Fri, 2 Mar 2018 17:24:19 +0800 > > Dave Young wrote: > > > > > On 02/26/18 at 01:00pm, Michal Suchanek wrote: > > > > Not

[PATCH v3 5/5] kexec: document -s, -c and -a options.

2018-03-02 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- kexec/kexec.8 | 15 +++ 1 file changed, 15 insertions(+) diff --git a/kexec/kexec.8 b/kexec/kexec.8 index e0131b4ea827..b3543db3f413 100644 --- a/kexec/kexec.8 +++ b/kexec/kexec.8 @@ -144,6 +144,21 @@ Load the new kernel for use

[PATCH v3 1/5] kexec: Return -ENOSYS when kexec does not know how to call KEXEC_FILE_LOAD

2018-03-02 Thread Michal Suchanek
When the kernel does not know a syscall number it returns -ENOSYS but when kexec does not know a syscall number it returns -1. Return -ENOSYS from kexec as well. Signed-off-by: Michal Suchanek --- kexec/kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 3/5] kexec: add option to revert -s

2018-03-02 Thread Michal Suchanek
The undocumented -s option selects KEXEC_FILE_LOAD syscall but there is no option to select KEXEC_LOAD syscall so add it. It is generally good idea and in followup patch the default will be changed so it will be needed to get KEXEC_LOAD functionality. Signed-off-by: Michal Suchanek

[PATCH v3 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Michal Suchanek
Not all architectures implement KEXEC_FILE_LOAD. However, on some archiectures KEXEC_FILE_LOAD is required when secure boot is enabled in locked-down mode. Previously users had to select the KEXEC_FILE_LOAD syscall with undocumented -s option. However, if they did pass the option kexec would fail

[PATCH v3 2/5] kexec: do not special-case the -s option

2018-03-02 Thread Michal Suchanek
It is parsed separately to save a few CPU cycles when setting up other options but it just complicates the code. So fold it back and set up all flags both for KEXEC_LOAD and KEXEC_FILE_LOAD Signed-off-by: Michal Suchanek --- kexec/kexec.c | 25 - 1

Re: [PATCH 2/5] kexec: do not special-case the -s option

2018-03-02 Thread Michal Suchánek
On Fri, 2 Mar 2018 13:36:16 +0100 Simon Horman wrote: > On Mon, Feb 26, 2018 at 01:00:35PM +0100, Michal Suchanek wrote: > > It is parsed separately to save a few CPU cycles when setting up > > other options but it just complicates the code. So fold it back and > > set up all

Re: [PATCH 1/5] kexec: Return -ENOSYS when kexec does not know how to call KEXEC_FILE_LOAD

2018-03-02 Thread Michal Suchánek
On Fri, 2 Mar 2018 13:34:45 +0100 Simon Horman wrote: > On Mon, Feb 26, 2018 at 01:00:34PM +0100, Michal Suchanek wrote: > > When the kernel does not know a syscall number it returns -ENOSYS > > but when kexec does not know a syscall number it returns -1. Return > > -ENOSYS

[RFC 2/2] cxgb4: collect hardware dump in kernel panic

2018-03-02 Thread Rahul Lakkireddy
Pre-allocate dump buffer and register callback to collect hardware/ firmware logs in kernel panic. Free dump buffer on driver unload. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Michal Suchánek
On Fri, 2 Mar 2018 17:24:19 +0800 Dave Young wrote: > On 02/26/18 at 01:00pm, Michal Suchanek wrote: > > Not all architectures implement KEXEC_FILE_LOAD. However, on some > > archiectures KEXEC_FILE_LOAD is required when secure boot is > > enabled in locked-down mode.

Re: [PATCH 1/5] kexec: Return -ENOSYS when kexec does not know how to call KEXEC_FILE_LOAD

2018-03-02 Thread Simon Horman
On Mon, Feb 26, 2018 at 01:00:34PM +0100, Michal Suchanek wrote: > When the kernel does not know a syscall number it returns -ENOSYS but > when kexec does not know a syscall number it returns -1. Return -ENOSYS > from kexec as well. > > Signed-off-by: Michal Suchanek > --- >

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Simon Horman
On Mon, Feb 26, 2018 at 01:00:37PM +0100, Michal Suchanek wrote: > Not all architectures implement KEXEC_FILE_LOAD. However, on some > archiectures KEXEC_FILE_LOAD is required when secure boot is enabled in > locked-down mode. Previously users had to select the KEXEC_FILE_LOAD > syscall with

Re: [PATCH 4/5] kexec: fallback to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported.

2018-03-02 Thread Simon Horman
On Fri, Mar 02, 2018 at 01:32:52PM +0100, Michal Suchánek wrote: > On Fri, 2 Mar 2018 17:24:19 +0800 > Dave Young wrote: > > > On 02/26/18 at 01:00pm, Michal Suchanek wrote: > > > Not all architectures implement KEXEC_FILE_LOAD. However, on some > > > archiectures

[RFC 1/2] kernel/crash_core: add API to collect hardware dump in kernel panic

2018-03-02 Thread Rahul Lakkireddy
Add API to allow drivers to register callback to collect device specific hardware/firmware dump during kernel panic. The registered callbacks will be invoked during kernel panic before moving to second kernel. Also save the dump location and size in vmcore info. The dump can be extracted using

[RFC 0/2] kernel: add support to collect hardware logs in panic

2018-03-02 Thread Rahul Lakkireddy
On production servers running variety of workloads over time, kernel panic can happen sporadically after days or even months. It is important to collect as much debug logs as possible to root cause and fix the problem, that may not be easy to reproduce. Snapshot of underlying hardware/firmware

Re: [PATCH 2/5] kexec: do not special-case the -s option

2018-03-02 Thread Simon Horman
On Mon, Feb 26, 2018 at 01:00:35PM +0100, Michal Suchanek wrote: > It is parsed separately to save a few CPU cycles when setting up other > options but it just complicates the code. So fold it back and set up all > flags both for KEXEC_LOAD and KEXEC_FILE_LOAD > > Signed-off-by: Michal Suchanek