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

[Xen-changelog] [xen-unstable] merge



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID 92066b3fcd86457df3920d021f8b7f07322a46e3
# Parent  2b78726766d1cdf426dce65e08c45dde6e391df3
# Parent  708b915caf78fdcb8ebddf0300aaa2b4b0dfbb86
merge
---
 xen/arch/x86/domain_build.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -r 2b78726766d1 -r 92066b3fcd86 xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Tue Aug 22 17:16:58 2006 +0100
+++ b/xen/arch/x86/domain_build.c       Tue Aug 22 18:48:00 2006 +0100
@@ -66,11 +66,15 @@ static char opt_dom0_ioports_disable[200
 static char opt_dom0_ioports_disable[200] = "";
 string_param("dom0_ioports_disable", opt_dom0_ioports_disable);
 
+#if defined(__i386__)
+/* No ring-3 access in initial leaf page tables. */
 #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED)
 #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
-#if CONFIG_PAGING_LEVELS == 3
 #define L3_PROT (_PAGE_PRESENT)
-#elif CONFIG_PAGING_LEVELS == 4
+#elif defined(__x86_64__)
+/* Allow ring-3 access in long mode as guest cannot use ring 1. */
+#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
+#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
 #define L3_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
 #define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
 #endif
@@ -697,7 +701,9 @@ int construct_dom0(struct domain *d,
     {
         p += strlen("HYPERCALL_PAGE=");
         hypercall_page = simple_strtoul(p, NULL, 16);
+        printk("(1) hypercall page is %#lx\n", hypercall_page);
         hypercall_page = dsi.v_start + (hypercall_page << PAGE_SHIFT);
+        printk("(2) hypercall page is %#lx dsi.v_start is %#lx\n", 
hypercall_page, dsi.v_start);
         if ( (hypercall_page < dsi.v_start) || (hypercall_page >= v_end) )
         {
             write_ptbase(current);
@@ -706,6 +712,7 @@ int construct_dom0(struct domain *d,
             return -1;
         }
 
+        printk("(3) hypercall page is %#lx\n", hypercall_page);
         hypercall_page_initialise(d, (void *)hypercall_page);
     }
 

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


 


Rackspace

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