linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc/mm: Conditionally call H_BLOCK_REMOVE
@ 2019-08-30 12:07 Laurent Dufour
  2019-08-30 12:07 ` [PATCH 1/3] powerpc/mm: Initialize the HPTE encoding values Laurent Dufour
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Laurent Dufour @ 2019-08-30 12:07 UTC (permalink / raw)
  To: mpe, benh, paulus, aneesh.kumar, npiggin
  Cc: linux-mm, linuxppc-dev, linux-kernel

Since the commit ba2dd8a26baa ("powerpc/pseries/mm: call H_BLOCK_REMOVE"),
the call to H_BLOCK_REMOVE is always done if the feature is exhibited.

On some system, the hypervisor may not support all the combination of
segment base page size and page size. When this happens the hcall is
returning H_PARAM, which is triggering a BUG_ON check leading to a panic.

The PAPR document is specifying a TLB Block Invalidate Characteristics item
detailing which couple base page size, page size the hypervisor is
supporting through H_BLOCK_REMOVE. Furthermore, the characteristics are
also providing the size of the block the hcall could process.

Supporting various block size seems not needed as all systems I was able to
play with was support an 8 addresses block size, which is the maximum
through the hcall. Supporting various size may complexify the algorithm in
call_block_remove() so unless this is required, this is not done.

In the case of block size different from 8, a warning message is displayed
at boot time and that block size will be ignored checking for the
H_BLOCK_REMOVE support.

Due to the minimal amount of hardware showing a limited set of
H_BLOCK_REMOVE supported page size, I don't think there is a need to push
this series to the stable mailing list.

The first patch is initializing the penc values for each page size to an
invalid value to be able to detect those which have been initialized as 0
is a valid value.

The second patch is reading the characteristic through the hcall
ibm,get-system-parameter and record the supported block size for each page
size.

The third patch is changing the check used to detect the H_BLOCK_REMOVE
availability to take care of the base page size and page size couple.

Laurent Dufour (3):
  powerpc/mm: Initialize the HPTE encoding values
  powperc/mm: read TLB Block Invalidate Characteristics
  powerpc/mm: call H_BLOCK_REMOVE when supported

 arch/powerpc/include/asm/book3s/64/mmu.h |   3 +
 arch/powerpc/mm/book3s64/hash_utils.c    |   8 +-
 arch/powerpc/platforms/pseries/lpar.c    | 118 ++++++++++++++++++++++-
 3 files changed, 125 insertions(+), 4 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-11-11 11:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 12:07 [PATCH 0/3] powerpc/mm: Conditionally call H_BLOCK_REMOVE Laurent Dufour
2019-08-30 12:07 ` [PATCH 1/3] powerpc/mm: Initialize the HPTE encoding values Laurent Dufour
2019-09-12 13:32   ` Aneesh Kumar K.V
2019-09-12 13:37   ` Aneesh Kumar K.V
2019-09-13 10:56     ` Laurent Dufour
2019-08-30 12:07 ` [PATCH 2/3] powperc/mm: read TLB Block Invalidate Characteristics Laurent Dufour
2019-09-12 14:16   ` Aneesh Kumar K.V
2019-09-13 13:55     ` Laurent Dufour
2019-09-12 14:44   ` Aneesh Kumar K.V
2019-09-12 19:26     ` Laurent Dufour
2019-09-13  2:00       ` Aneesh Kumar K.V
2019-09-13  9:10         ` Laurent Dufour
2019-08-30 12:07 ` [PATCH 3/3] powerpc/mm: call H_BLOCK_REMOVE when supported Laurent Dufour
2019-09-12 14:20   ` Aneesh Kumar K.V
2019-09-13 13:16     ` Laurent Dufour
2019-09-12 13:44 ` [PATCH 0/3] powerpc/mm: Conditionally call H_BLOCK_REMOVE Aneesh Kumar K.V
2019-09-13 11:09   ` Laurent Dufour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).