]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Introduce pkvm_alloc_private_va_range()
authorKalesh Singh <kaleshsingh@google.com>
Wed, 20 Apr 2022 21:42:53 +0000 (14:42 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 28 Apr 2022 19:53:13 +0000 (20:53 +0100)
commitb2a40410f983f9529caff8fff490ef110e99119b
tree6ab6e124c71ef01dc5df7ea384b8087d9c418473
parent505de81c2c9b27119cc12a18951f1eed367933d9
KVM: arm64: Introduce pkvm_alloc_private_va_range()

pkvm_hyp_alloc_private_va_range() can be used to reserve private VA ranges
in the pKVM nVHE hypervisor. Allocations are aligned based on the order of
the requested size.

This will be used to implement stack guard pages for pKVM nVHE hypervisor
(in a subsequent patch in the series).

Credits to Quentin Perret <qperret@google.com> for the idea of moving
private VA allocation out of __pkvm_create_private_mapping()

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220420214317.3303360-3-kaleshsingh@google.com
arch/arm64/kvm/hyp/include/nvhe/mm.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/mm.c