aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-11-14 17:49:14 +0000
committerOlaf Hering <olaf@aepfle.de>2011-11-14 17:49:14 +0000
commitd2cb52cc6c4795d31ada3233efa465e96f009f11 (patch)
tree2f26fa4d9ba037e297e5d9037e6b157de7816767 /tools/xenpaging
parentbfbaed092edf2c8389c8c8504cd23954b7734945 (diff)
downloadxen-d2cb52cc6c4795d31ada3233efa465e96f009f11.tar.gz
xen-d2cb52cc6c4795d31ada3233efa465e96f009f11.tar.bz2
xen-d2cb52cc6c4795d31ada3233efa465e96f009f11.zip
xenpaging: munmap all pages after page-in
Do munmap() on all mapped pages, not just the first one. Without this change the gfns backing the remaining pages can not be paged out again because the page count does not go down to 1. This change was missing from changeset 23827:d1d6abc1db20. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenpaging')
-rw-r--r--tools/xenpaging/pagein.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenpaging/pagein.c b/tools/xenpaging/pagein.c
index e2d7840894..579620f241 100644
--- a/tools/xenpaging/pagein.c
+++ b/tools/xenpaging/pagein.c
@@ -44,7 +44,7 @@ static void *page_in(void *arg)
/* Ignore errors */
page = xc_map_foreign_pages(pia->xch, pia->dom, PROT_READ, gfns, num);
if (page)
- munmap(page, PAGE_SIZE);
+ munmap(page, PAGE_SIZE * num);
}
page_in_possible = 0;
pthread_exit(NULL);