[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 03 of 10] xenpaging: mmap guest pages read-only


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Mon, 30 Jan 2012 16:59:26 +0100
  • Delivery-date: Mon, 30 Jan 2012 15:59:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1327937794 -3600
# Node ID dcf9cca8e1d5121782ea96dc183f52ff0cee2251
# Parent  55b2e9676a5a871833e6c57ec3b424c70f15af2b
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@xxxxxxxxx>

diff -r 55b2e9676a5a -r dcf9cca8e1d5 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -585,7 +585,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);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.