linux-stable/arch
Quentin Perret 1d58a17ef5 KVM: arm64: Fix host stage-2 PGD refcount
The KVM page-table library refcounts the pages of concatenated stage-2
PGDs individually. However, when running KVM in protected mode, the
host's stage-2 PGD is currently managed by EL2 as a single high-order
compound page, which can cause the refcount of the tail pages to reach 0
when they shouldn't, hence corrupting the page-table.

Fix this by introducing a new hyp_split_page() helper in the EL2 page
allocator (matching the kernel's split_page() function), and make use of
it from host_s2_zalloc_pages_exact().

Fixes: 1025c8c0c6 ("KVM: arm64: Wrap the host with a stage 2")
Acked-by: Will Deacon <will@kernel.org>
Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005090155.734578-5-qperret@google.com
2021-10-05 13:02:54 +01:00
..
alpha Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arm ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
arm64 KVM: arm64: Fix host stage-2 PGD refcount 2021-10-05 13:02:54 +01:00
csky Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
m68k Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips Merge branch 'linus' into smp/urgent 2021-09-11 00:38:47 +02:00
nds32 nds32/setup: remove unused memblock_region variable in setup_memory() 2021-09-08 18:45:53 -07:00
nios2 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
parisc parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
powerpc arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
riscv Updates for the SMP and CPU hotplug: 2021-09-12 12:42:51 -07:00
s390 2nd batch of s390 updates for 5.15 merge window 2021-09-09 12:55:12 -07:00
sh Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
sparc arch: remove compat_alloc_user_space 2021-09-08 15:32:35 -07:00
um This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
x86 Merge branch 'linus' into smp/urgent 2021-09-11 00:38:47 +02:00
xtensa Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
.gitignore
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00