Hi Dave,
On 28/01/20 3:08 pm, Sandipan Das wrote:
> On 27/01/20 9:12 pm, Dave Hansen wrote:
>>
>> How have you tested this patch (and the whole series for that matter)?
>>
>
> I replaced the second patch with this one and did a build test.
> Till v16, I had tested the whole series (build + run) o
On Tue, Jan 28, 2020 at 02:07:10PM -0500, Qian Cai wrote:
> On Jan 28, 2020, at 12:47 PM, Catalin Marinas wrote:
> > The primary goal here is not finding regressions but having clearly
> > defined semantics of the page table accessors across architectures. x86
> > and arm64 are a good starting poi
On powerpc, we only have USER_DS and KERNEL_DS
Today, this is managed as an 'unsigned long' data space limit
which is used to compare the passed address with, plus a bit
in the thread_info flags that is set whenever modifying the limit
to enable the verification in addr_limit_user_check()
The lim
On powerpc, we only have USER_DS and KERNEL_DS
Today, this is managed as an 'unsigned long' data space limit
which is used to compare the passed address with, plus a bit
in the thread_info flags that is set whenever modifying the limit
to enable the verification in addr_limit_user_check()
The lim
> On Jan 29, 2020, at 5:36 AM, Catalin Marinas wrote:
>
> On Tue, Jan 28, 2020 at 02:07:10PM -0500, Qian Cai wrote:
>> On Jan 28, 2020, at 12:47 PM, Catalin Marinas
>> wrote:
>>> The primary goal here is not finding regressions but having clearly
>>> defined semantics of the page table acces
On book3s/32 CPUs that are handling MMU through a hash table,
MMU_init_hw() function was adapted for VMAP_STACK in order to
handle virtual addresses instead of physical addresses in the
low level hash functions.
When using KASAN, the same adaptations are required for the
early hash table set up by
On Wed, Jan 29, 2020 at 02:58:44PM +1000, Nicholas Piggin wrote:
> Adhemerval Zanella's on January 29, 2020 3:26 am:
> > __asm__ __volatile__\
> > ("sc\n\t" \
> >"bns+ 1f\n\t"
Package_id is to find out all cores that are part of the same chip. On
PowerNV machines, package_id defaults to chip_id. However ibm,chip_id
property is not present in device-tree of PowerVM Lpars. Hence lscpu
output shows one core per socket and multiple cores.
To overcome this, use nid as the pa
Note: (Only patch 4 changes from v5)
Abdul reported a warning on a shared lpar.
"WARNING: workqueue cpumask: online intersect > possible intersect".
This is because per node workqueue possible mask is set very early in the
boot process even before the system was querying the home node
associativi
There is no value in unpacking associativity, if
H_HOME_NODE_ASSOCIATIVITY hcall has returned an error.
Signed-off-by: Srikar Dronamraju
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Nathan Lynch
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Abdul Haleem
Cc: Satheesh Rajendran
Reported-by: Abdul Hale
All the sibling threads of a core have to be part of the same node.
To ensure that all the sibling threads map to the same node, always
lookup/update the cpu-to-node map of the first thread in the core.
Signed-off-by: Srikar Dronamraju
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Nathan Lynch
Currently code handles H_FUNCTION, H_SUCCESS, H_HARDWARE return codes.
However hcall_vphn can return other return codes. Now it also handles
H_PARAMETER return code. Also the rest return codes are handled under the
default case.
Signed-off-by: Srikar Dronamraju
Cc: Michael Ellerman
Cc: Nicholas
With commit ("powerpc/numa: Early request for home node associativity"),
commit 2ea626306810 ("powerpc/topology: Get topology for shared
processors at boot") which was requesting home node associativity
becomes redundant.
Hence remove the late request for home node associativity.
Signed-off-by: S
Currently the kernel detects if its running on a shared lpar platform
and requests home node associativity before the scheduler sched_domains
are setup. However between the time NUMA setup is initialized and the
request for home node associativity, workqueue initializes its per node
cpumask. The pe
The PAPR standard provides suitable mechanisms to query the health and
performance stats of an NVDIMM via various hcalls as described in Ref[2]. Until
now these stats were never fetched in the papr_scm modules nor exposed to the
user-space tools like 'ndctl'. This is partly due to PAPR platform not
Implement support for fetching dimm health information via
H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair of
64-bit big-endian integers which are then stored in 'struct
papr_scm_priv' and subsequently exposed to userspace via dimm
attribute 'papr_health'.
References:
[1]: htt
Implement support for fetching dimm performance metrics via
H_SCM_PERFORMANCE_HEALTH hcall as documented in Ref[1]. The hcall
returns a structure as described in Ref[1] and defined as newly
introduced 'struct papr_scm_perf_stats'. The struct has a header
followed by key-value pairs of performance a
Add PAPR-scm family of DSM command-set to to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index de5d90212409..0e09dc5cec19 100644
--- a
Implement support for handling PAPR DSM commands in papr_scm
module. We advertise support for ND_CMD_CALL for the dimm command mask
and implement necessary scaffolding in the module to handle ND_CMD_CALL
ioctl and DSM commands that we receive.
The layout of the DSM commands as we expect from libnv
The DSM 'DSM_PAPR_SCM_HEALTH' should return the health-bitmap and
health-valid-bitmap information for a dimm back to userspace in
response to ND_CMD_CALL.
This patch implements this DSM by implementing a new function
papr_scm_get_health() that queries the DIMM health information and
then copies th
The DSM 'DSM_PAPR_SCM_STATS' should return the PAPR defined buffer
that holds various dimm performance attributes as defined in Ref[1]
back to user-space in response to ND_CMD_CALL.
Presently the module doesn't interpret nor consume these stat as they
are only intended to be consumer and reported
Nicholas Piggin writes:
> Adhemerval Zanella's on January 29, 2020 3:26 am:
>>
>> We already had to push a similar hack where glibc used to abort transactions
>> prior syscalls to avoid some side-effects on kernel (commit 56cf2763819d2f).
>> It was eventually removed from syscall handling by f04
* Segher Boessenkool:
> On Tue, Jan 28, 2020 at 05:04:49PM +0100, Florian Weimer wrote:
>> * Segher Boessenkool:
>>
>> >> > I don't think we can save LR in a regular register around the system
>> >> > call, explicitly in the inline asm statement, because we still have to
>> >> > generate proper u
On Wed, Jan 29, 2020 at 05:19:19PM +0100, Florian Weimer wrote:
> * Segher Boessenkool:
> >> But GCC doesn't expose them as integers to C code, so you can't do much
> >> without them.
> >
> > Sure, it doesn't expose any other registers directly, either.
>
> I can use r0 & 1 with a register variabl
* Segher Boessenkool:
> On Wed, Jan 29, 2020 at 05:19:19PM +0100, Florian Weimer wrote:
>> * Segher Boessenkool:
>> >> But GCC doesn't expose them as integers to C code, so you can't do much
>> >> without them.
>> >
>> > Sure, it doesn't expose any other registers directly, either.
>>
>> I can us
On Wed, Jan 29, 2020 at 06:02:34PM +0100, Florian Weimer wrote:
> * Segher Boessenkool:
>
> > On Wed, Jan 29, 2020 at 05:19:19PM +0100, Florian Weimer wrote:
> >> * Segher Boessenkool:
> >> >> But GCC doesn't expose them as integers to C code, so you can't do much
> >> >> without them.
> >> >
> >>
On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote:
> Scott Cheloha writes:
> > LMB lookup is currently an O(n) linear search. This scales poorly when
> > there are many LMBs.
> >
> > If we cache each LMB by both its base address and its DRC index
> > in an xarray we can cut lookups to
On 1/28/20 1:38 AM, Sandipan Das wrote:
> On 27/01/20 9:12 pm, Dave Hansen wrote:
>> How have you tested this patch (and the whole series for that matter)?
>>
> I replaced the second patch with this one and did a build test.
> Till v16, I had tested the whole series (build + run) on both a POWER8
>
* Dave Hansen:
> Still doesn't build for me:
>
>> # make
>> make --no-builtin-rules ARCH=x86_64 -C ../../../.. headers_install
>> make[1]: Entering directory '/home/dave/linux.git'
>> INSTALL ./usr/include
>> make[1]: Leaving directory '/home/dave/linux.git'
>> make: *** No rule to make target
is_32bit_task() exists on both PPC64 and PPC32, no need of an ifdefery.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/process.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index fad50db9dcf2..e730b8e522b0 100644
---
On Wed, Jan 29, 2020 at 07:50:07PM +, Christophe Leroy wrote:
> is_32bit_task() exists on both PPC64 and PPC32, no need of an ifdefery.
>
> Signed-off-by: Christophe Leroy
> ---
> arch/powerpc/kernel/process.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pro
On Tue, 28 Jan 2020 06:57:53 +0530
Anshuman Khandual wrote:
> This adds tests which will validate architecture page table helpers and
> other accessors in their compliance with expected generic MM semantics.
> This will help various architectures in validating changes to existing
> page table hel
On Mon, 27 Jan 2020 22:33:08 -0500
Qian Cai wrote:
> >
> >> Did those tests ever find any regression or this is almost only useful for
> >> new
> >
> > The test has already found problems with s390 page table helpers.
>
> Hmm, that is pretty weak where s390 is not even official supported with
On Wed, Jan 22, 2020 at 10:25:42AM +0530, Bharata B Rao wrote:
> When migrate_vma_setup() fails in kvmppc_svm_page_out(),
> release kvm->arch.uvmem_lock before returning.
>
> Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests")
> Signed-off-by: Bharata B Rao
Thanks, appl
Function papr_scm_ndctl() is neither exported from the module nor
called directly from outside 'papr.c' hence should be marked 'static'.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
Hi Dave,
On 30/01/20 12:29 am, Dave Hansen wrote:
> On 1/28/20 1:38 AM, Sandipan Das wrote:
>> On 27/01/20 9:12 pm, Dave Hansen wrote:
>>> How have you tested this patch (and the whole series for that matter)?
>>>
>> I replaced the second patch with this one and did a build test.
>> Till v16, I ha
The platform makefile (arch/powerpc/platforms/pseries/Makefile) is only
included by the platform makefile (arch/powerpc/platform/Makefile) when
CONFIG_PPC_PSERIES is selected, so checking for CONFIG_PPC_PSERIES in the
pseries makefile is pointless.
Signed-off-by: Oliver O'Halloran
---
arch/power
vio.c requires CONFIG_IBMVIO which in turn depends on PPC_PSERIES.
In other words, this ifdef is pointless. At a guess it's a carry-over
from pre-history.
Signed-off-by: Oliver O'Halloran
---
arch/powerpc/platforms/pseries/vio.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/p
From: Ram Pai
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Acked-by: Ingo Molnar
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/.gitignore | 1 +
tools/testing/selftests/vm/Makefile
From: Ram Pai
This renames PKRU references to "pkey_reg" or "pkey" based on
the usage.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Reviewed-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-helpers.h| 85
From: Ram Pai
Moved all the generic definition and helper functions to the
header file.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-helpers.h| 35 ++
From: Thiago Jung Bauermann
In preparation for multi-arch support, move definitions which
have arch-specific values to x86-specific header.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
From: Thiago Jung Bauermann
This will help us ensure we print pkey_reg_t values correctly in
different architectures.
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-helpers.h | 4
1 file changed, 4 insertions(+)
diff --git a/tools/te
The size of the pkey register can vary across architectures.
This converts the data type of all its references to u64 in
preparation for multi-arch support.
To keep the definition of the u64 type consistent and remove
format specifier related warnings, __SANE_USERSPACE_TYPES__
is defined as sugges
This introduces some functions that help with setting
or clearing bits of a particular pkey. This also adds
an abstraction for getting a pkey's bit position in
the pkey register as this may vary across architectures.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/pkey-helpers.h|
Memory protection keys enables an application to protect its address
space from inadvertent access by its own code.
This feature is now enabled on powerpc and has been available since
4.16-rc1. The patches move the selftests to arch neutral directory
and enhance their test coverage.
Tested on pow
From: Ram Pai
Currently, pkey_disable_clear() sets the specified bits
instead clearing them. This has been dead code up to now
because its only callers i.e. pkey_access/write_allow()
are also unused.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-b
From: Ram Pai
In some cases, a pkey's bits need not necessarily change
in a way that the value of the pkey register increases
when performing a pkey_disable_set() or decreases when
performing a pkey_disable_clear().
For example, on powerpc, if a pkey's current state is
PKEY_DISABLE_ACCESS and we
From: Ram Pai
alloc_random_pkey() was allocating the same pkey every
time. Not all pkeys were geting tested. This fixes it.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 3 ++-
The huge page size can vary across architectures. This will
ensure that the correct huge page size is used when accessing
the hugetlb controls under sysfs. Instead of using a hardcoded
page size (i.e. 2MB), this now uses the HPAGE_SIZE macro which
is arch-specific.
Signed-off-by: Sandipan Das
---
From: Ram Pai
This introduces some generic abstractions and provides
the corresponding architecture-specfic implementations
for these abstractions.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Sandipan Das
---
tools/testing/s
From: Ram Pai
This makes use of the abstractions added earlier and
introduces support for powerpc.
For powerpc, after receiving the SIGSEGV, the signal
handler must explicitly restore access permissions
for the faulting pkey to allow the test to continue.
As this makes use of pkey_access_allow()
From: "Desnes A. Nunes do Rosario"
The number of reserved pkeys in a PowerNV environment is
different from that on PowerVM or KVM.
Tested on PowerVM and PowerNV environments.
Signed-off-by: "Desnes A. Nunes do Rosario"
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
---
tools/testing/sel
From: Ram Pai
Some pkeys which are valid on the hardware are reserved
and not available for application use. These keys cannot
be allocated.
test_pkey_alloc_exhaust() tries to account for these and
has an assertion which validates if all available pkeys
have been exahaustively allocated. However
From: Ram Pai
Detect access-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 19 +
From: Ram Pai
Detect write-violation on a page to which write-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 12
From: Ram Pai
Detect write-violation on a page to which access-disabled
key is associated much after the page is mapped.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Acked-by: Dave Hansen
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 13 +++
From: Ram Pai
This introduces a new allocator that allocates 4K hardware
pages to back 64K linux pages. This allocator is available
only on powerpc.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Sandipan Das
---
tools/testing/
From: Ram Pai
For the pkeys subsystem to work, both the CPU and the
kernel need to have support. So, additionally check if
the kernel supports pkeys apart from the CPU feature
checks.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
---
tools/testing/sel
From: Ram Pai
Ensure that pkey-0 is allocated on start and that it can
be attached dynamically in various modes, without failures.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/protection_keys.c | 53
From: Ram Pai
Some platforms hardcode the x86 values for PKEY_DISABLE_ACCESS
and PKEY_DISABLE_WRITE such as those in:
/usr/include/bits/mman-shared.h.
This overrides the definitions with correct values for powerpc.
cc: Dave Hansen
cc: Florian Weimer
Signed-off-by: Ram Pai
Signed-off-by: San
Both 4K and 64K pages are supported on powerpc. Parts of
the selftest code perform alignment computations based on
the PAGE_SIZE macro which is currently hardcoded to 64K
for powerpc. This causes some test failures on kernels
configured with 4K page size.
In some cases, we need to enforce function
This ensures that both 32-bit and 64-bit binaries are generated
when this is built on a x86_64 system. Most of the changes have
been borrowed from tools/testing/selftests/x86/Makefile.
Signed-off-by: Sandipan Das
---
tools/testing/selftests/vm/Makefile | 72 +
1 file
On Thu, Jan 30, 2020 at 5:32 PM Oliver O'Halloran wrote:
>
> The platform makefile (arch/powerpc/platforms/pseries/Makefile) is only
doh
s/platform/pseries/
> included by the platform makefile (arch/powerpc/platform/Makefile) when
> CONFIG_PPC_PSERIES is selected, so checking for CONFIG_PPC_PSE
The second patch was already posted independently but because
of the changes in the first patch, the second one now depends
on it. Hence posting it now as a part of this series.
The last version (v2) of the second patch can be found at:
https://patchwork.ozlabs.org/patch/1225969/
Sandipan Das (2)
Some tests are built only for 64-bit systems. This makes
sure that these tests are built for both big and little
endian variants of powerpc64.
Fixes: 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on 64bit arch")
Reviewed-by: Kamalesh Babulal
Signed-off-by: Sandipan Das
---
tools/test
Independent builds of the vm selftests is currently broken
because commit 7549b3364201 overrides the value of ARCH with
the machine name from uname. This does not always match the
architecture names used for tasks like header installation.
E.g. for building tests on powerpc64, we need ARCH=powerpc
On Wed, Jan 29, 2020 at 11:20:44PM +0100, Gerald Schaefer wrote:
> On Mon, 27 Jan 2020 22:33:08 -0500
>
> For example, who would have thought that pXd_bad() is supposed to
> report large entries as bad? It's not really documented anywhere,
A bit off-topic,
@Anshuman, maybe you could start a Docu
68 matches
Mail list logo