----- Original Message -----
Starting with kernel 4.12, the hash page table geometry is updated
to
accommodate larger VA range. Update here accordingly.
Signed-off-by: Hari Bathini <hbathini(a)linux.vnet.ibm.com>
---
changes in v1:
* Kernel commit 92d9dfda8b54 reverted the geometry update
for 4K hash pagetable. So, undo'ing 4K pagesize changes.
Hari,
As discussed in the related bugzilla, this patch fixes the user-space address
translation issues seen in 4.14-based kernels. Queued for crash-7.2.1:
https://github.com/crash-utility/crash/commit/c8178eca9c74f81a7f803a58d33...
Thanks for your help,
Dave
defs.h | 3 +++
ppc64.c | 12 +++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/defs.h b/defs.h
index 18f36b3..9132075 100644
--- a/defs.h
+++ b/defs.h
@@ -3915,6 +3915,9 @@ struct efi_memory_desc_t {
#define PGD_INDEX_SIZE_L4_64K_3_10 12
#define PMD_INDEX_SIZE_L4_64K_4_6 5
#define PUD_INDEX_SIZE_L4_64K_4_6 5
+#define PMD_INDEX_SIZE_L4_64K_4_12 10
+#define PUD_INDEX_SIZE_L4_64K_4_12 7
+#define PGD_INDEX_SIZE_L4_64K_4_12 8
#define PTE_INDEX_SIZE_RADIX_64K 5
#define PMD_INDEX_SIZE_RADIX_64K 9
#define PUD_INDEX_SIZE_RADIX_64K 9
diff --git a/ppc64.c b/ppc64.c
index 84cec09..672ee60 100644
--- a/ppc64.c
+++ b/ppc64.c
@@ -447,10 +447,16 @@ ppc64_init(int when)
} else if (!(machdep->flags & BOOK3E) &&
(THIS_KERNEL_VERSION >= LINUX(4,6,0))) {
m->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
- m->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
- m->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
- m->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ if (THIS_KERNEL_VERSION >= LINUX(4,12,0)) {
+ m->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
+ m->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
+ m->l4_index_size = PGD_INDEX_SIZE_L4_64K_4_12;
+ } else {
+ m->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
+ m->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
+ m->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ }
} else if (THIS_KERNEL_VERSION >= LINUX(3,10,0)) {
m->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
m->l2_index_size = PMD_INDEX_SIZE_L4_64K_3_10;