ANDROID: KVM: arm64: Configure size of pKVM linear map on the cmdline
We currently reserve enough memory for pKVM to construct a stage-1 page-table that maps all of memory at page granularity. However, in practice the amount of memory actually mapped into EL2 stage-1 is quite small as it mainly consists of the hypervisor itself and guest metadata (kvm, kvm_vcpu and related, plus stage-2 page-tables). To avoid the waste, introduce a new kernel cmdline parameter that defines how much memory can be mapped in total into the hypervisor linear map at any point in time. This value should be set conservatively, as allocation failures in the hypervisor are likely to be fatal. Bug: 357781595 Bug: 239674049 Change-Id: I979fa07fa14566793f990d7e1ad9c8c3644cba9a Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
@@ -2739,6 +2739,11 @@
|
||||
(enabled). Disable by KVM if hardware lacks support
|
||||
for NPT.
|
||||
|
||||
kvm-arm.hyp_lm_size_mb=
|
||||
[KVM,ARM,EARLY] Maximum amount of contiguous memory mappable in
|
||||
the pKVM hypervisor linear map, in MB. Any attempt to map more
|
||||
memory than this into pKVM stage-1 at run-time may be fatal.
|
||||
|
||||
kvm-arm.mode=
|
||||
[KVM,ARM,EARLY] Select one of KVM/arm64's modes of
|
||||
operation.
|
||||
|
||||
Reference in New Issue
Block a user