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: 273700914
Bug: 239674049
Bug: 442947149
Change-Id: I979fa07fa14566793f990d7e1ad9c8c3644cba9a
Signed-off-by:
Quentin Perret <qperret@google.com>
Loading
Please sign in to comment