diff options
author | Keir Fraser <keir@xen.org> | 2011-01-11 10:38:28 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-01-11 10:38:28 +0000 |
commit | ee3c42ba5bffeb7fa2ea4baac6af8608c707e1b8 (patch) | |
tree | 90e8465e4e7dbf4c5c82282364db8cd6d5e9dc4d /xen/common/memory.c | |
parent | bc89270b8a749773ca717a5c21dcce4a9edd7894 (diff) | |
download | xen-ee3c42ba5bffeb7fa2ea4baac6af8608c707e1b8.tar.gz xen-ee3c42ba5bffeb7fa2ea4baac6af8608c707e1b8.tar.bz2 xen-ee3c42ba5bffeb7fa2ea4baac6af8608c707e1b8.zip |
xenpaging: drop paged pages in guest_remove_page
Simply drop paged-pages in guest_remove_page(), and notify xenpaging
to drop its reference to the gfn. If the ring is full, the page will
remain in paged-out state in xenpaging. This is not an issue, it just
means this gfn will not be nominated again.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r-- | xen/common/memory.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c index 33cc3f3e32..cf6482de9f 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -163,6 +163,12 @@ int guest_remove_page(struct domain *d, unsigned long gmfn) #ifdef CONFIG_X86 mfn = mfn_x(gfn_to_mfn(p2m_get_hostp2m(d), gmfn, &p2mt)); + if ( unlikely(p2m_is_paging(p2mt)) ) + { + guest_physmap_remove_page(d, gmfn, mfn, 0); + p2m_mem_paging_drop_page(p2m_get_hostp2m(d), gmfn); + return 1; + } #else mfn = gmfn_to_mfn(d, gmfn); #endif |