[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/paging: drop set-allocation from final-teardown
commit 6b41622ae03015d275de2b73a4177c6d5570004a Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Mar 16 14:43:31 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Mar 16 14:43:31 2023 +0100 x86/paging: drop set-allocation from final-teardown The fixes for XSA-410 have arranged for P2M pages being freed by P2M code to be properly freed directly, rather than being put back on the paging pool list. Therefore whatever p2m_teardown() may return will no longer need taking care of here. Drop the code, leaving the assertions in place and adding "total" back to the PAGING_PRINTK() message. With merely the (optional) log message and the assertions left, there's really no point anymore to hold the paging lock there, so drop that too. Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/mm/paging.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index 4e4de80f55..616010e6b8 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -865,22 +865,13 @@ void paging_final_teardown(struct domain *d) /* It is now safe to pull down the p2m map. */ p2m_teardown(p2m_get_hostp2m(d), true, NULL); - /* Free any paging memory that the p2m teardown released. */ - paging_lock(d); - - if ( hap ) - hap_set_allocation(d, 0, NULL); - else - shadow_set_allocation(d, 0, NULL); - - PAGING_PRINTK("%pd done: free = %u, p2m = %u\n", - d, d->arch.paging.free_pages, d->arch.paging.p2m_pages); + PAGING_PRINTK("%pd done: total = %u, free = %u, p2m = %u\n", + d, d->arch.paging.total_pages, + d->arch.paging.free_pages, d->arch.paging.p2m_pages); ASSERT(!d->arch.paging.p2m_pages); ASSERT(!d->arch.paging.free_pages); ASSERT(!d->arch.paging.total_pages); - paging_unlock(d); - p2m_final_teardown(d); } -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |