[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/x86: p2m-pod: Clean-up p2m_pod_zero_check
commit 5529c9c2a8d78b98d33f239ef6ea7e6ff2045b33 Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Mon Oct 2 13:59:37 2017 +0100 Commit: George Dunlap <george.dunlap@xxxxxxxxxx> CommitDate: Mon Oct 2 17:32:32 2017 +0100 xen/x86: p2m-pod: Clean-up p2m_pod_zero_check Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx> --- xen/arch/x86/mm/p2m-pod.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c index 176d06c..6581f8d 100644 --- a/xen/arch/x86/mm/p2m-pod.c +++ b/xen/arch/x86/mm/p2m-pod.c @@ -861,17 +861,19 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) for ( i = 0; i < count; i++ ) { p2m_access_t a; + struct page_info *pg; mfns[i] = p2m->get_entry(p2m, _gfn(gfns[i]), types + i, &a, 0, NULL, NULL); + pg = mfn_to_page(mfns[i]); + /* * If this is ram, and not a pagetable or from the xen heap, and * probably not mapped elsewhere, map it; otherwise, skip. */ - if ( p2m_is_ram(types[i]) - && ( (mfn_to_page(mfns[i])->count_info & PGC_allocated) != 0 ) - && ( (mfn_to_page(mfns[i])->count_info & (PGC_page_table|PGC_xen_heap)) == 0 ) - && ( (mfn_to_page(mfns[i])->count_info & PGC_count_mask) <= max_ref ) ) + if ( p2m_is_ram(types[i]) && (pg->count_info & PGC_allocated) && + !(pg->count_info & (PGC_page_table | PGC_xen_heap)) && + ((pg->count_info & PGC_count_mask) <= max_ref) ) map[i] = map_domain_page(mfns[i]); else map[i] = NULL; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |