x86/mm: Don't fail to nominate for paging on type flag, rather look at type count

Xen doesn't clean the type flag when dropping the type count for a page to
zero. So, looking at the type flag when nominating a page for paging it's
incorrect. Look at the type count instead.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
This commit is contained in:
Andres Lagar-Cavilla committed 2012-02-02 12:22:34 +00:00
1 parent af518d3ea1
commit 6623226237
1 file changed
+2 -2
+2 -2
View File
@@ -759,7 +759,7 @@ int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn)
(1 | PGC_allocated) )
goto out;
if ( (page->u.inuse.type_info & PGT_type_mask) != PGT_none )
if ( (page->u.inuse.type_info & PGT_count_mask) != 0 )
goto out;
/* Fix p2m entry */
@@ -820,7 +820,7 @@ int p2m_mem_paging_evict(struct domain *d, unsigned long gfn)
(2 | PGC_allocated) )
goto out_put;
if ( (page->u.inuse.type_info & PGT_type_mask) != PGT_none )
if ( (page->u.inuse.type_info & PGT_count_mask) != 0 )
goto out_put;
/* Decrement guest domain's ref count of the page */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.