Re: [PATCH 17/17] arch: rename copy_thread_tls() back to copy_thread()

2020-06-26 Thread Greentime Hu
Christian Brauner 於 2020年6月23日 週二 上午7:58寫道: > > Now that HAVE_COPY_THREAD_TLS has been removed, rename copy_thread_tls() > back simply copy_thread(). It's a simpler name, and doesn't imply that only > tls is copied here. This finishes an outstanding chunk of internal process > creation work since

Re: [PATCH 16/17] arch: remove HAVE_COPY_THREAD_TLS

2020-06-26 Thread Greentime Hu
Christian Brauner 於 2020年6月23日 週二 上午7:46寫道: > > All architectures support copy_thread_tls() now, so remove the legacy > copy_thread() function and the HAVE_COPY_THREAD_TLS config option. Everyone > uses the same process creation calling convention based on > copy_thread_tls() and struct

Re: [PATCH v5 06/12] arch: xtensa: add linker section for KUnit test suites

2020-06-26 Thread Kees Cook
On Fri, Jun 26, 2020 at 02:09:11PM -0700, Brendan Higgins wrote: > Add a linker section to xtensa where KUnit can put references to its > test suites. This patch is an early step in transitioning to dispatching > all KUnit tests from a centralized executor rather than having each as > its own

Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-26 Thread Kees Cook
On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > Add a linker section where KUnit can put references to its test suites. > This patch is the first step in transitioning to dispatching all KUnit > tests from a centralized executor rather than having each as its own > separate

[PATCH 11/11] ppc64/kexec_file: add appropriate regions for memory reserve map

2020-06-26 Thread Hari Bathini
While initrd, elfcorehdr and backup regions are already added to the reserve map, there are a few missing regions that need to be added to the memory reserve map. Add them here. And now that all the changes to load panic kernel are in place, claim likewise. Signed-off-by: Hari Bathini ---

[PATCH 09/11] ppc64/kexec_file: setup backup region for kdump kernel

2020-06-26 Thread Hari Bathini
Though kdump kernel boots from loaded address, the first 64K bytes of it is copied down to real 0. So, setup a backup region to copy the first 64K bytes of crashed kernel, in purgatory, before booting into kdump kernel. Also, update reserve map with backup region and crashed kernel's memory to

[PATCH 08/11] ppc64/kexec_file: setup the stack for purgatory

2020-06-26 Thread Hari Bathini
To avoid any weird errors, the purgatory should run with its own stack. Set one up by adding the stack buffer to .data section of the purgatory. Signed-off-by: Hari Bathini --- arch/powerpc/include/asm/kexec.h |4 arch/powerpc/kexec/file_load_64.c | 14 +-

[PATCH 07/11] ppc64/kexec_file: add support to relocate purgatory

2020-06-26 Thread Hari Bathini
Right now purgatory implementation is only minimal. But if purgatory code is to be enhanced to copy memory to the backup region and verify sha256 digest, relocations may have to be applied to the purgatory. So, add support to relocate purgatory in kexec_file_load system call by setting up TOC

[PATCH 06/11] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-06-26 Thread Hari Bathini
Kdump kernel, used for capturing the kernel core image, is supposed to use only specific memory regions to avoid corrupting the image to be captured. The regions are crashkernel range - the memory reserved explicitly for kdump kernel, memory used for the tce-table, the OPAL region and RTAS region

[PATCH 05/11] powerpc/drmem: make lmb walk a bit more flexible

2020-06-26 Thread Hari Bathini
Currently, numa & prom are the users of drmem lmb walk code. Loading kdump with kexec_file also needs to walk the drmem LMBs to setup the usable memory ranges for kdump kernel. But there are couple of issues in using the code as is. One, walk_drmem_lmb() code is built into the .init section

[PATCH 00/11] ppc64: enable kdump support for kexec_file_load syscall

2020-06-26 Thread Hari Bathini
This patch series enables kdump support for kexec_file_load system call (kexec -s -p) on PPC64. The changes are inspired from kexec-tools code but heavily modified for kernel consumption. There is scope to expand purgatory to verify sha digest but tried to keep purgatory changes minimal in the

Re: [PATCH 0/8 v2] PCI: Align return values of PCIe capability and PCI accessors

2020-06-26 Thread Bjorn Helgaas
On Mon, Jun 15, 2020 at 09:32:17AM +0200, refactormys...@gmail.com wrote: > From: Bolarinwa Olayemi Saheed > > > PATCH 1/8 to 7/8: > PCIBIOS_ error codes have positive values and they are passed down the > call heirarchy from accessors. For functions which are meant to return > only a negative

Re: [PATCH v2 5/6] powerpc/pseries/iommu: Make use of DDW even if it does not map the partition

2020-06-26 Thread Leonardo Bras
On Fri, 2020-06-26 at 12:23 -0300, Leonardo Bras wrote: > On Wed, 2020-06-24 at 03:24 -0300, Leonardo Bras wrote: > > As of today, if a DDW is created and can't map the whole partition, it's > > removed and the default DMA window "ibm,dma-window" is used instead. > > > > Usually this DDW is

Re: [PATCH v2 6/6] powerpc/pseries/iommu: Avoid errors when DDW starts at 0x00

2020-06-26 Thread Leonardo Bras
On Wed, 2020-06-24 at 03:24 -0300, Leonardo Bras wrote: > As of today, enable_ddw() will return a non-null DMA address if the > created DDW maps the whole partition. If the address is valid, > iommu_bypass_supported_pSeriesLP() will consider iommu bypass enabled. > > This can cause some trouble

[PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests

2020-06-26 Thread Desnes A. Nunes do Rosario
An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- formed when count_pmc() is used to reset PMCs on a few selftests. This extra pmc_count can occasionally invalidate results, such as the ones from cycles_test shown hereafter. The ebb_check_count() failed with an above the

Re: [PATCH v2 00/15] Documentation fixes

2020-06-26 Thread Jonathan Corbet
On Tue, 23 Jun 2020 09:08:56 +0200 Mauro Carvalho Chehab wrote: > As requested, this is a rebase of a previous series posted on Jan, 15. > > Since then, several patches got merged via other trees or became > obsolete. There were also 2 patches before that fits better at the > ReST conversion

[PATCH v2 1/3] powerpc/mm: Enable radix GTSE only if supported.

2020-06-26 Thread Bharata B Rao
Make GTSE an MMU feature and enable it by default for radix. However for guest, conditionally enable it if hypervisor supports it via OV5 vector. Let prom_init ask for radix GTSE only if the support exists. Having GTSE as an MMU feature will make it easy to enable radix without GTSE. Currently

[PATCH v2 2/3] powerpc/pseries: H_REGISTER_PROC_TBL should ask for GTSE only if enabled

2020-06-26 Thread Bharata B Rao
H_REGISTER_PROC_TBL asks for GTSE by default. GTSE flag bit should be set only when GTSE is supported. Signed-off-by: Bharata B Rao --- arch/powerpc/platforms/pseries/lpar.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/pseries/lpar.c

Re: [PATCH] powerpc/pseries: Use doorbells even if XIVE is available

2020-06-26 Thread Cédric Le Goater
Adding David, On 6/25/20 3:11 AM, Michael Ellerman wrote: > Nicholas Piggin writes: >> KVM supports msgsndp in guests by trapping and emulating the >> instruction, so it was decided to always use XIVE for IPIs if it is >> available. However on PowerVM systems, msgsndp can be used and gives >>

Re: [PATCH 09/13] x86: Remove dev->archdata.iommu pointer

2020-06-26 Thread Borislav Petkov
On Thu, Jun 25, 2020 at 03:08:32PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > There are no users left, all drivers have been converted to use the > per-device private pointer offered by IOMMU core. > > Signed-off-by: Joerg Roedel > --- > arch/x86/include/asm/device.h | 3 --- > 1

[PATCH v3 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-06-26 Thread Kajol Jain
This patchset add cpu hotplug support for hv_24x7 driver by adding online/offline cpu hotplug function. It also add sysfs file "cpumask" to expose current online cpu that can be used for hv_24x7 event count. Changelog: v2 -> v3 - Corrected some of the typo mistakes and update commit message as

[PATCH v3 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-06-26 Thread Kajol Jain
Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters

[PATCH v3 1/2] powerpc/perf/hv-24x7: Add cpu hotplug support

2020-06-26 Thread Kajol Jain
Patch here adds cpu hotplug functions to hv_24x7 pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the

Re: [PATCH v2 3/5] libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier

2020-06-26 Thread Michal Suchánek
On Fri, May 22, 2020 at 09:01:17AM -0400, Mikulas Patocka wrote: > > > On Fri, 22 May 2020, Aneesh Kumar K.V wrote: > > > On 5/22/20 3:01 PM, Michal Suchánek wrote: > > > On Thu, May 21, 2020 at 02:52:30PM -0400, Mikulas Patocka wrote: > > > > > > > > > > > > On Thu, 21 May 2020, Dan

[PATCH v2 3/4] powerpc sstep: introduce macros to retrieve Prefix instruction operands

2020-06-26 Thread Balamuruhan S
retrieve prefix instruction operands RA and pc relative bit R values using macros and adopt it in sstep.c and test_emulate_step.c. Signed-off-by: Balamuruhan S --- arch/powerpc/include/asm/sstep.h | 4 arch/powerpc/lib/sstep.c | 12 ++-- 2 files changed, 10 insertions(+),

[PATCH v2 1/4] powerpc test_emulate_step: enhancement to test negative scenarios

2020-06-26 Thread Balamuruhan S
add provision to declare test is a negative scenario, verify whether emulation fails and avoid executing it. Signed-off-by: Balamuruhan S --- arch/powerpc/lib/test_emulate_step.c | 30 +++- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git

Re: [bug] LTP mmap03 stuck in page fault loop after c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user")

2020-06-26 Thread Aneesh Kumar K.V
On 6/26/20 1:17 PM, Aneesh Kumar K.V wrote: Hi Jan, On 6/26/20 12:29 PM, Jan Stancek wrote: Hi, LTP mmap03 is getting stuck in page fault loop after commit    c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user") System is ppc64le P9 lpar [1] running

Re: [PATCH] powerpc/pseries: Use doorbells even if XIVE is available

2020-06-26 Thread Cédric Le Goater
>>> An option vector (or dt-cpu-ftrs) could be defined to disable msgsndp >>> to get KVM performance back. > > An option vector would require a PAPR change. Unless the architecture > reserves some bits for the implementation, but I don't think so. Same > for CAS. > >> Qemu/KVM populates

Re: [PATCH v2 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-06-26 Thread kajoljain
On 6/26/20 1:15 PM, Gautham R Shenoy wrote: > On Wed, Jun 24, 2020 at 05:58:31PM +0530, Madhavan Srinivasan wrote: >> >> >> On 6/24/20 4:26 PM, Gautham R Shenoy wrote: >>> Hi Kajol, >>> >>> On Wed, Jun 24, 2020 at 03:47:54PM +0530, Kajol Jain wrote: Patch here adds a cpumask attr to

Re: [bug] LTP mmap03 stuck in page fault loop after c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user")

2020-06-26 Thread Aneesh Kumar K.V
Hi Jan, On 6/26/20 12:29 PM, Jan Stancek wrote: Hi, LTP mmap03 is getting stuck in page fault loop after commit c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user") System is ppc64le P9 lpar [1] running v5.8-rc2-34-g3e08a95294a4. Here's a minimized

Re: [PATCH v2 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-06-26 Thread Gautham R Shenoy
On Wed, Jun 24, 2020 at 05:58:31PM +0530, Madhavan Srinivasan wrote: > > > On 6/24/20 4:26 PM, Gautham R Shenoy wrote: > >Hi Kajol, > > > >On Wed, Jun 24, 2020 at 03:47:54PM +0530, Kajol Jain wrote: > >>Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. > >> >

Re: [PATCH] powerpc/pseries: Use doorbells even if XIVE is available

2020-06-26 Thread Cédric Le Goater
[ ... ] >>> An option vector (or dt-cpu-ftrs) could be defined to disable msgsndp >>> to get KVM performance back. > > An option vector would require a PAPR change. Unless the architecture > reserves some bits for the implementation, but I don't think so. Same > for CAS. > >> Qemu/KVM

[bug] LTP mmap03 stuck in page fault loop after c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user")

2020-06-26 Thread Jan Stancek
Hi, LTP mmap03 is getting stuck in page fault loop after commit c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user") System is ppc64le P9 lpar [1] running v5.8-rc2-34-g3e08a95294a4. Here's a minimized reproducer: - 8<

[PATCH] crypto: af_alg - Fix regression on empty requests

2020-06-26 Thread Herbert Xu
On Tue, Jun 23, 2020 at 10:02:17AM -0700, Eric Biggers wrote: > > The source code for the two failing AF_ALG tests is here: > > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/crypto/af_alg02.c >