On Thu, Oct 20, 2022 at 02:38:06PM +0100, Will Deacon wrote: > From: Quentin Perret <qperret@xxxxxxxxxx> > > 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@xxxxxxxxxx> > Signed-off-by: Quentin Perret <qperret@xxxxxxxxxx> > Signed-off-by: Will Deacon <will@xxxxxxxxxx> Reviewed-by: Oliver Upton <oliver.upton@xxxxxxxxx> -- Thanks, Oliver