On 7/4/19 6:12 PM, Jon Masters wrote: > I think we have identified the root cause of the 32-bit builder issue. > Many thanks to Paul and Peter for assistance in debugging. Here's my > write-up, and we'll work with the vendor on a suitable mitigation to > workaround any errata: > > https://medium.com/@jonmasters_84473/debugging-a-32-bit-fedora-arm-builder-issue-73295d7d673d The hardware vendor have reproduced what I believe to be an errata. Meanwhile, I've made a test kernel that forces CONFIG_HIGHPTE to off: https://koji.fedoraproject.org/koji/taskinfo?taskID=36328838 With this kernel, you still get LPAE but leaf level PTEs are not allocated from high memory any longer. This is because I believe the errata to be caused by stage 1 page table walks in the guest trapping to stage 2 (hypervisor) for e.g. Access bit updates on the host. When those occur, I believe there is a truncation of the guest IPA (guest memory) address to 32-bits, but only for page table entry walks. Normal translation faults I think are unaffected by this (TBC). Normally, we don't allocate PGDs (high level page table pieces) from high memory (we allocate those from kernel memory caches) but we DO allocate PTEs specifically from what might be high memory. Except when we force CONFIG_HIGHPTE to off. The patch I'm using is attached. It's currently being tested. If it works, I'm curious for input on temporarily carrying this in Fedora. In theory it means an LPAE system could starve for PTEs if it has many many processes running, but in practice I'm willing to bet LPAE is mostly used by Fedora for the 32-bit builders and that few people would actually complain if we did this. Jon. -- Computer Architect | Sent with my Fedora powered laptop
From 19908e5fe3e63ed2d39f0a8a9135f35fd428d766 Mon Sep 17 00:00:00 2001 From: Jon Masters <jcm@xxxxxxxxxx> Date: Thu, 18 Jul 2019 15:47:26 -0400 Subject: [PATCH] arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT We will use this to force CONFIG_HIGHPTE off on LPAE for now Signed-off-by: Jon Masters <jcm@xxxxxxxxxx> --- arch/arm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2bf1ce39a96d..e792b3e60095 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1644,9 +1644,9 @@ config HIGHMEM If unsure, say n. config HIGHPTE - bool "Allocate 2nd-level pagetables from highmem" if EXPERT + bool "Allocate 2nd-level pagetables from highmem" depends on HIGHMEM - default y + default n help The VM uses one page of physical memory for each page table. For systems with a lot of processes, this can use a lot of -- 2.17.2
_______________________________________________ arm mailing list -- arm@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to arm-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/arm@xxxxxxxxxxxxxxxxxxxxxxx