direct-io.hg

changeset 11229:708b915caf78

[XEN] Revert changes to dom0 domain builder made by cset 11226.

We require that the dom0 domain builder still sets _PAGE_USER.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Aug 22 18:47:29 2006 +0100 (2006-08-22)
parents bb8d13705aac
children 92066b3fcd86
files xen/arch/x86/domain_build.c
line diff
     1.1 --- a/xen/arch/x86/domain_build.c	Tue Aug 22 15:55:43 2006 +0100
     1.2 +++ b/xen/arch/x86/domain_build.c	Tue Aug 22 18:47:29 2006 +0100
     1.3 @@ -66,11 +66,15 @@ boolean_param("dom0_shadow", opt_dom0_sh
     1.4  static char opt_dom0_ioports_disable[200] = "";
     1.5  string_param("dom0_ioports_disable", opt_dom0_ioports_disable);
     1.6  
     1.7 +#if defined(__i386__)
     1.8 +/* No ring-3 access in initial leaf page tables. */
     1.9  #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED)
    1.10  #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    1.11 -#if CONFIG_PAGING_LEVELS == 3
    1.12  #define L3_PROT (_PAGE_PRESENT)
    1.13 -#elif CONFIG_PAGING_LEVELS == 4
    1.14 +#elif defined(__x86_64__)
    1.15 +/* Allow ring-3 access in long mode as guest cannot use ring 1. */
    1.16 +#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
    1.17 +#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    1.18  #define L3_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    1.19  #define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
    1.20  #endif
    1.21 @@ -697,7 +701,9 @@ int construct_dom0(struct domain *d,
    1.22      {
    1.23          p += strlen("HYPERCALL_PAGE=");
    1.24          hypercall_page = simple_strtoul(p, NULL, 16);
    1.25 +        printk("(1) hypercall page is %#lx\n", hypercall_page);
    1.26          hypercall_page = dsi.v_start + (hypercall_page << PAGE_SHIFT);
    1.27 +        printk("(2) hypercall page is %#lx dsi.v_start is %#lx\n", hypercall_page, dsi.v_start);
    1.28          if ( (hypercall_page < dsi.v_start) || (hypercall_page >= v_end) )
    1.29          {
    1.30              write_ptbase(current);
    1.31 @@ -706,6 +712,7 @@ int construct_dom0(struct domain *d,
    1.32              return -1;
    1.33          }
    1.34  
    1.35 +        printk("(3) hypercall page is %#lx\n", hypercall_page);
    1.36          hypercall_page_initialise(d, (void *)hypercall_page);
    1.37      }
    1.38