WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.1-testing] hvm: Allocate an unmapped guard page t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] hvm: Allocate an unmapped guard page to separate ordinary low RAM
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jan 2008 11:50:20 -0800
Delivery-date: Fri, 18 Jan 2008 11:50:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200664451 0
# Node ID d2282880a92e51deae71ec4c42b8771fb91d969d
# Parent  79dab3f0d0940fb30b25ccb7147423e4fae6f9ca
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16728:be960a84e492c1baa0a2dfa76b1a770d0df5e433
xen-unstable date:        Thu Jan 17 12:59:10 2008 +0000
---
 tools/libxc/xc_hvm_build.c |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff -r 79dab3f0d094 -r d2282880a92e tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Fri Jan 18 13:53:38 2008 +0000
+++ b/tools/libxc/xc_hvm_build.c        Fri Jan 18 13:54:11 2008 +0000
@@ -85,13 +85,19 @@ static void build_e820map(void *e820_pag
     e820entry[nr_map].type = E820_RESERVED;
     nr_map++;
 
-    /* Low RAM goes here. Remove 3 pages for ioreq, bufioreq, and xenstore. */
+    /*
+     * Low RAM goes here. Remove 4 pages for: ioreq, bufioreq, and xenstore.
+     *  1. Guard page.
+     *  2. Buffered ioreq.
+     *  3. Xenstore.
+     *  4. Normal ioreq.
+     */
     e820entry[nr_map].addr = 0x100000;
-    e820entry[nr_map].size = mem_size - 0x100000 - PAGE_SIZE * 3;
+    e820entry[nr_map].size = mem_size - 0x100000 - PAGE_SIZE * 4;
     e820entry[nr_map].type = E820_RAM;
     nr_map++;
 
-    /* Explicitly reserve space for special pages (ioreq and xenstore). */
+    /* Explicitly reserve space for special pages. */
     e820entry[nr_map].addr = mem_size - PAGE_SIZE * 3;
     e820entry[nr_map].size = PAGE_SIZE * 3;
     e820entry[nr_map].type = E820_RESERVED;
@@ -253,6 +259,15 @@ static int setup_guest(int xc_handle,
     else
         shared_page_nr = (v_end >> PAGE_SHIFT) - 1;
 
+    /* Free the guard page that separates low RAM from special pages. */
+    rc = xc_domain_memory_decrease_reservation(
+            xc_handle, dom, 1, 0, &page_array[shared_page_nr-3]);
+    if ( rc != 0 )
+    {
+        PERROR("Could not deallocate guard page for HVM guest.\n");
+        goto error_out;
+    }
+
     /* Paranoia: clean pages. */
     if ( xc_clear_domain_page(xc_handle, dom, shared_page_nr) ||
          xc_clear_domain_page(xc_handle, dom, shared_page_nr-1) ||

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] hvm: Allocate an unmapped guard page to separate ordinary low RAM, Xen patchbot-3.1-testing <=