[PATCH v5 04/25] KVM: arm64: Fix-up hyp stage-1 refcounts for all pages mapped at EL2

Oliver Upton oliver.upton at linux.dev
Thu Oct 27 17:31:31 PDT 2022


On Thu, Oct 20, 2022 at 02:38:06PM +0100, Will Deacon wrote:
> From: Quentin Perret <qperret at google.com>
> 
> In order to allow unmapping arbitrary memory pages from the hypervisor
> stage-1 page-table, fix-up the initial refcount for pages that have been
> mapped before the 'vmemmap' array was up and running so that it
> accurately accounts for all existing hypervisor mappings.
> 
> This is achieved by traversing the entire hypervisor stage-1 page-table
> during initialisation of EL2 and updating the corresponding
> 'struct hyp_page' for each valid mapping.
> 
> Tested-by: Vincent Donnefort <vdonnefort at google.com>
> Signed-off-by: Quentin Perret <qperret at google.com>
> Signed-off-by: Will Deacon <will at kernel.org>

Reviewed-by: Oliver Upton <oliver.upton at linux.dev>

--
Thanks,
Oliver



More information about the linux-arm-kernel mailing list