mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
af518d3ea1
commit
6623226237
1 file changed
+2
-2
@@ -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 */
|
||||
|
||||