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 Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Signed-off-by: Michael Holzheu <holzheu@xxxxxxxxxxxxxxxxxx> --- 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; }
From: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Subject: [PATCH] s390: add 2GB frame support for page table walker The 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. Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> --- 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; }
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility