FROMLIST: KVM: arm64: Back the hypervisor 'struct hyp_page' array for all memory
The EL2 'vmemmap' array in nVHE Protected mode is currently very sparse: only memory pages owned by the hypervisor itself have a matching 'struct hyp_page'. However, as the size of this struct has been reduced significantly since its introduction, it appears that we can now afford to back the vmemmap for all of memory. Having an easily accessible 'struct hyp_page' for every physical page in memory provides the hypervisor with a simple mechanism to store metadata (e.g. a refcount) that wouldn't otherwise fit in the very limited number of software bits available in the host stage-2 page-table entries. This will be used in subsequent patches when pinning host memory pages for use by the hypervisor at EL2. Tested-by:Vincent Donnefort <vdonnefort@google.com> Signed-off-by:
Quentin Perret <qperret@google.com> Signed-off-by:
Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20221020133827.5541-4-will@kernel.org Signed-off-by:
Will Deacon <willdeacon@google.com> Bug: 233587962 Change-Id: Ifced0fb12faf2af6b757d68e18ba7cb74fdd0871 Signed-off-by:
Quentin Perret <qperret@google.com>
Loading
Please sign in to comment