mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[IA64] Fix of C/S 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5 for IA64.
When page is zapped from a domain, the page referenced counter is checked. But it results in false positive alert on Xen/IA64 because a page 'in use' has reference count 2 on Xen/IA64. - a page is assigned to guest domain's psudo physical address space. This is decremented by guest_physmap_remove_page() - a page is allocated for a domain. This is decremented by the following put_page() Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
This commit is contained in:
1 parent
9684bace62
commit
3461dbd75f
3 files changed
+11
-1
No files matched your search
+1
-1
@@ -170,7 +170,7 @@ guest_remove_page(
|
||||
if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
|
||||
put_page(page);
|
||||
|
||||
if ( unlikely((page->count_info & PGC_count_mask) != 1) )
|
||||
if ( unlikely(!page_is_removable(page)) )
|
||||
{
|
||||
/* We'll make this a guest-visible error in future, so take heed! */
|
||||
DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
|
||||
|
||||
@@ -213,6 +213,11 @@ static inline int get_page_and_type(struct page_info *page,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static inline int page_is_removable(struct page_info *page)
|
||||
{
|
||||
return ((page->count_info & PGC_count_mask) == 2);
|
||||
}
|
||||
|
||||
#define set_machinetophys(_mfn, _pfn) do { } while(0);
|
||||
|
||||
#ifdef MEMORY_GUARD
|
||||
|
||||
@@ -241,6 +241,11 @@ static inline int get_page_and_type(struct page_info *page,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static inline int page_is_removable(struct page_info *page)
|
||||
{
|
||||
return ((page->count_info & PGC_count_mask) == 1);
|
||||
}
|
||||
|
||||
#define ASSERT_PAGE_IS_TYPE(_p, _t) \
|
||||
ASSERT(((_p)->u.inuse.type_info & PGT_type_mask) == (_t)); \
|
||||
ASSERT(((_p)->u.inuse.type_info & PGT_count_mask) != 0)
|
||||
|
||||