Re: [PATCH 0/5] s390/pci: automatic error recovery

2021-09-06 Thread Linas Vepstas
On Mon, Sep 6, 2021 at 4:49 AM Niklas Schnelle wrote: > I believe we might be the first > implementation of PCI device recovery in a virtualized setting requiring > us to > coordinate the device reset with the hypervisor platform by issuing a > disable > and re-enable to the platform as well as

Re: [PATCH 0/5] s390/pci: automatic error recovery

2021-09-06 Thread Oliver O'Halloran
On Mon, Sep 6, 2021 at 7:49 PM Niklas Schnelle wrote: > > Patch 3 I already sent separately resulting in the discussion below but > without > a final conclusion. > > https://lore.kernel.org/lkml/20210720150145.640727-1-schne...@linux.ibm.com/ > > I believe even though there were some doubts

Re: [PATCH 3/5] PCI: Move pci_dev_is/assign_added() to pci.h

2021-09-06 Thread kernel test robot
Hi Niklas, I love your patch! Yet something to improve: [auto build test ERROR on s390/features] [also build test ERROR on next-20210906] [cannot apply to pci/next powerpc/next v5.14] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest

Re: [PATCH 3/5] PCI: Move pci_dev_is/assign_added() to pci.h

2021-09-06 Thread kernel test robot
Hi Niklas, I love your patch! Yet something to improve: [auto build test ERROR on s390/features] [also build test ERROR on next-20210906] [cannot apply to pci/next powerpc/next v5.14] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest

Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-06 Thread Helge Deller
On 9/6/21 1:16 PM, Weizhao Ouyang wrote: Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common ftrace_dyn_arch_init() to cleanup them. Signed-off-by: Weizhao Ouyang Acked-by: Heiko Carstens (s390) Acked-by: Helge Deller # parisc Thanks, Helge --- Changes in v2: --

Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-06 Thread Weizhao Ouyang
On 2021/9/6 22:22, Michael Ellerman wrote: > Weizhao Ouyang writes: >> Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common >> ftrace_dyn_arch_init() to cleanup them. >> >> Signed-off-by: Weizhao Ouyang >> Acked-by: Heiko Carstens (s390) >> >> --- >> >> Changes in v2: >> --

Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-06 Thread Michael Ellerman
Weizhao Ouyang writes: > Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common > ftrace_dyn_arch_init() to cleanup them. > > Signed-off-by: Weizhao Ouyang > Acked-by: Heiko Carstens (s390) > > --- > > Changes in v2: > -- correct CONFIG_DYNAMIC_FTRACE on PowerPC > -- add

Re: [PATCH] powerpc/mce: Fix access error in mce handler

2021-09-06 Thread Michael Ellerman
Ganesh Goudar writes: > We queue an irq work for deferred processing of mce event > in realmode mce handler, where translation is disabled. > Queuing of the work may result in accessing memory outside > RMO region, such access needs the translation to be enabled > for an LPAR running with hash

[PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-06 Thread Weizhao Ouyang
Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common ftrace_dyn_arch_init() to cleanup them. Signed-off-by: Weizhao Ouyang Acked-by: Heiko Carstens (s390) --- Changes in v2: -- correct CONFIG_DYNAMIC_FTRACE on PowerPC -- add Acked-by tag --- arch/arm/kernel/ftrace.c

Re: [PATCH 1/5] KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest

2021-09-06 Thread Paolo Bonzini
On 20/08/21 20:51, Mathieu Desnoyers wrote: Ah, or is it the case that rseq_cs is non-NULL if and only if userspace is in an rseq critical section, and because syscalls in critical sections are illegal, by definition clearing rseq_cs is a nop unless userspace is misbehaving. Not quite, as I

[PATCH 4/5] PCI: Export pci_dev_lock()

2021-09-06 Thread Niklas Schnelle
Commit e3a9b1212b9d ("PCI: Export pci_dev_trylock() and pci_dev_unlock()") already exported pci_dev_trylock()/pci_dev_unlock() however in some circumstances such as during error recovery it makes sense to block waiting to get full access to the device so also export pci_dev_lock(). Signed-off-by:

[PATCH 5/5] s390/pci: implement minimal PCI error recovery

2021-09-06 Thread Niklas Schnelle
When the platform detects an error on a PCI function or a service action has been performed it is put in the error state and an error event notification is provided to the OS. Currently we treat all error event notifications the same and simply set pdev->error_state = pci_channel_io_perm_failure

[PATCH 3/5] PCI: Move pci_dev_is/assign_added() to pci.h

2021-09-06 Thread Niklas Schnelle
The helper function pci_dev_is_added() from drivers/pci/pci.h is used in PCI arch code of both s390 and powerpc leading to awkward relative includes. Move it to the global include/linux/pci.h and get rid of these includes just for that one function. Signed-off-by: Niklas Schnelle ---

[PATCH 2/5] s390/pci: implement reset_slot for hotplug slot

2021-09-06 Thread Niklas Schnelle
This is done by adding a zpci_hot_reset_device() call which does a low level reset of the PCI function without changing its higher level function state. This way it can be used while the zPCI function is bound to a driver and with DMA tables being controlled either through the IOMMU or DMA APIs

[PATCH 0/5] s390/pci: automatic error recovery

2021-09-06 Thread Niklas Schnelle
Hello, This series implements automatic error recovery for PCI devices on s390 following the scheme outlined at Documentation/PCI/pci-error-recovery.rst it applies on top of currenct master. The patches have are almost completely s390 specific except for two patches exporting existing

[PATCH 1/5] s390/pci: refresh function handle in iomap

2021-09-06 Thread Niklas Schnelle
The function handle of a PCI function is updated when disabling or enabling it as well as when the function's availability changes or it enters the error state. Until now this only occurred either while there is no struct pci_dev associated with the function yet or the function became

[RFC PATCH v2] powerpc/papr_scm: Move duplicate definitions to common header files

2021-09-06 Thread Shivaprasad G Bhat
papr_scm and ndtest share common PDSM payload structs like nd_papr_pdsm_health. Presently these structs are duplicated across papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially arch independent and can run on platforms other than PPC64, a way needs to be deviced to avoid

[PATCH v2] tests/nvdimm/ndtest: Simulate nvdimm health, DSC and smart-inject

2021-09-06 Thread Shivaprasad G Bhat
The 'papr_scm' module and 'papr' implementation in libndctl supports PDSMs for reporting PAPR NVDIMM health, dirty-shutdown-count and injecting smart-errors. This patch adds support for those PDSMs in ndtest module so that PDSM specific paths in libndctl can be exercised. Signed-off-by:

[PATCH v2] powerpc/papr_scm: Implement initial support for injecting smart errors

2021-09-06 Thread Shivaprasad G Bhat
From: Vaibhav Jain Presently PAPR doesn't support injecting smart errors on an NVDIMM. This makes testing the NVDIMM health reporting functionality difficult as simulating NVDIMM health related events need a hacked up qemu version. To solve this problem this patch proposes simulating certain

[PATCH v3 3/3] powerpc/mce: Modify the real address error logging messages

2021-09-06 Thread Ganesh Goudar
To avoid ambiguity, modify the strings in real address error logging messages to "foreign/control memory" from "foreign", Since the error discriptions in P9 user manual and P10 user manual are different for same type of errors. P9 User Manual for MCE: DSISR:59 Host real address to foreign space

[PATCH v3 2/3] selftests/powerpc: Add test for real address error handling

2021-09-06 Thread Ganesh Goudar
Add test for real address or control memory address access error handling, using NX-GZIP engine. The error is injected by accessing the control memory address using illegal instruction, on successful handling the process attempting to access control memory address using illegal instruction

[PATCH v3 1/3] powerpc/pseries: Parse control memory access error

2021-09-06 Thread Ganesh Goudar
Add support to parse and log control memory access error for pseries. These changes are made according to PAPR v2.11 10.3.2.2.12. Signed-off-by: Ganesh Goudar --- v3: Modify the commit log to mention the document according to which changes are made. Define and use a macro to check if the

[PATCH] powerpc/mce: Fix access error in mce handler

2021-09-06 Thread Ganesh Goudar
We queue an irq work for deferred processing of mce event in realmode mce handler, where translation is disabled. Queuing of the work may result in accessing memory outside RMO region, such access needs the translation to be enabled for an LPAR running with hash mmu else the kernel crashes. So