# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1326290155 -3600
# Node ID ce095edc4f970b7b1bd6fa223137fc84607b2654
# Parent 17b173dbf8663f44790355b2503cb91f9788b84d
xenpaging: mmap guest pages read-only
xenpaging does not write to the gfn, so map the gfn to page-out in
read-only mode.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff -r 17b173dbf866 -r ce095edc4f97 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -584,7 +584,7 @@ static int xenpaging_evict_page(struct x
/* Map page */
ret = -EFAULT;
- page = xc_map_foreign_pages(xch, paging->mem_event.domain_id, PROT_READ
| PROT_WRITE, &victim, 1);
+ page = xc_map_foreign_pages(xch, paging->mem_event.domain_id, PROT_READ,
&victim, 1);
if ( page == NULL )
{
PERROR("Error mapping page %lx", gfn);