----- Original Message -----
Hi Dave,
On s390 the new zEC12 machines support 2GB frames. In order to walk page tables
correctly add support to the page table walker function so it detects 2GB frames.
Michael
Queued for crash-6.1.1.
Thanks,
Dave
Signed-off-by: Heiko Carstens <heiko.carstens(a)de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu(a)linux.vnet.ibm.com>
---
s390x.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/s390x.c
+++ b/s390x.c
@@ -643,6 +643,13 @@ int s390x_vtop(ulong table, ulong vaddr,
if (!entry)
return FALSE;
table = entry & ~0xfffULL;
+ /* Check if this a 2GB page */
+ if ((entry & 0x400ULL) && (level == 1)) {
+ /* Add the 2GB frame offset & return the final value. */
+ table &= ~0x7fffffffULL;
+ *phys_addr = table + (vaddr & 0x7fffffffULL);
+ return TRUE;
+ }
len = entry & 0x3ULL;
level--;
}
@@ -650,6 +657,7 @@ int s390x_vtop(ulong table, ulong vaddr,
/* Check if this is a large page. */
if (entry & 0x400ULL) {
/* Add the 1MB page offset and return the final value. */
+ table &= ~0xfffffULL;
*phys_addr = table + (vaddr & 0xfffffULL);
return TRUE;
}