diff options
author | Olaf Hering <olaf@aepfle.de> | 2012-02-20 16:11:38 +0000 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2012-02-20 16:11:38 +0000 |
commit | 20529ff6c6f75e6a3f5dc5e3e0345d30e797a56a (patch) | |
tree | cfae0cef9f90fece5ecd09599c56bcd32e282098 | |
parent | 2c69a23d42c94e6692951004ce83c80a046ce965 (diff) | |
download | xen-20529ff6c6f75e6a3f5dc5e3e0345d30e797a56a.tar.gz xen-20529ff6c6f75e6a3f5dc5e3e0345d30e797a56a.tar.bz2 xen-20529ff6c6f75e6a3f5dc5e3e0345d30e797a56a.zip |
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>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/xenpaging/xenpaging.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 2e8c10d143..6f18376b4b 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -574,7 +574,7 @@ static int xenpaging_evict_page(struct xenpaging *paging, struct victim *victim, gfn = victim->gfn; ret = -EFAULT; page = xc_map_foreign_pages(xch, paging->mem_event.domain_id, - PROT_READ | PROT_WRITE, &gfn, 1); + PROT_READ, &gfn, 1); if ( page == NULL ) { PERROR("Error mapping page %lx", victim->gfn); |