[PATCH v2 02/13] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport ---

[PATCH v2 03/13] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --

[PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h. The changes are mostly about mechanical replacement of pgd accessors with p4d ones and the addition of higher levels to

[PATCH v2 04/13] ia64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64/i

[PATCH v2 01/13] arm/arm64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants at on

[PATCH v2 05/13] nios2: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch/nio

[PATCH v2 08/13] sh: fault: Modernize printing of kernel messages

2020-02-16 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fault.c | 39

[PATCH v2 11/13] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapopor

[PATCH v2 10/13] sh: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh/

[PATCH v2 09/13] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh/

[PATCH v2 06/13] openrisc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10 -- a

[PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h |

[PATCH v2 13/13] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58 -- inc

[PATCH v2 12/13] asm-generic: remove pgtable-nop4d-hack.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h |

Re: [PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Russell King - ARM Linux admin
On Sun, Feb 16, 2020 at 10:18:30AM +0200, Mike Rapoport wrote: > From: Mike Rapoport > > Hi, > > These patches convert several architectures to use page table folding and > remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h. > > The changes are mostly about mechanical r

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-16 Thread Christophe Leroy
Le 16/02/2020 à 09:18, Mike Rapoport a écrit : From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. I don't think it is worth adding all this additionnals walks of p4d, this p

Re: [PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Christophe Leroy
Le 16/02/2020 à 09:22, Russell King - ARM Linux admin a écrit : On Sun, Feb 16, 2020 at 10:18:30AM +0200, Mike Rapoport wrote: From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5leve

[PATCH 4/5] KVM: arm64: Limit the debug architecture to ARMv8.0

2020-02-16 Thread Marc Zyngier
Let's not pretend we support anything but ARMv8.0 as far as the debug architecture is concerned. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 06b2d0dc6c73..43087b50a211

[PATCH 0/5] Random debug/PMU fixes for 5.6

2020-02-16 Thread Marc Zyngier
Here's a few cleanups and fixes for 5.6, all around our debug and PMU ID register emulation: 1) Missing RES1 bit in DBGDIDR 2) Limiting PMU version to v8.1 3) Limiting debug version to ARMv8.0 4) Support for ARMv8.4-PMU (1) was reported by Peter, (2) had a patch from Andrew Murray on the list, bu

[PATCH 1/5] KVM: arm64: Fix missing RES1 in emulation of DBGBIDR

2020-02-16 Thread Marc Zyngier
The AArch32 CP14 DBGDIDR has bit 15 set to RES1, which our current emulation doesn't set. Just add the missing bit. Reported-by: Peter Maydell Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c

[PATCH 3/5] kvm: arm64: Limit PMU version to ARMv8.1

2020-02-16 Thread Marc Zyngier
Our PMU code is only implementing the ARMv8.1 features, so let's stick to this when reporting the feature set to the guest. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c ind

[PATCH 2/5] KVM: arm64: Refactor filtering of ID registers

2020-02-16 Thread Marc Zyngier
Our current ID register filtering is starting to be a mess of if() statements, and isn't going to get any saner. Let's turn it into a switch(), which has a chance of being more readable. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 22 +++--- 1 file changed, 15 in

[PATCH 5/5] KVM: arm64: Upgrade PMU support to ARMv8.4

2020-02-16 Thread Marc Zyngier
Upgrading the PMU code from ARMv8.1 to ARMv8.4 turns out to be pretty easy. All that is required is support for PMMIR_EL1, which is read-only, and for which returning 0 is a valid option. Let's just do that and adjust what we return to the guest. Signed-off-by: Marc Zyngier --- arch/arm64/inclu

Re: [RFC PATCH 0/5] Removing support for 32bit KVM/arm host

2020-02-16 Thread Linus Walleij
On Mon, Feb 10, 2020 at 3:13 PM Marc Zyngier wrote: > it has been a good prototype for the arm64 version, > but it suffers a few problems: Wittgenstein wrote that sometimes an intellectual exercise work like such that you have to throw away the ladder after you climbed it. It often happens in en

RE: [RFC PATCH v10 0/9] Enable ptp_kvm for arm/arm64

2020-02-16 Thread Jianyong Wu
Hi, As this version change a lot, expect more comments. thanks. Thanks Jianyong > -Original Message- > From: Jianyong Wu > Sent: Monday, February 10, 2020 4:49 PM > To: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.ch

Re: [PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 08:22:30AM +, Russell King - ARM Linux admin wrote: > On Sun, Feb 16, 2020 at 10:18:30AM +0200, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > These patches convert several architectures to use page table folding and > > remove __ARCH_HAS_5LEVEL_HACK