ia64/xen-unstable

changeset 5764:5db799f4c40e

The patch attached restores NX/XD support in x86_64 xenlinux. When the
port was being done, Xen did not want to see the bit 63 in ptes, and it
now allows the guests to set it. Also include cleanups (warning when
compiling domU).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jul 13 08:37:38 2005 +0000 (2005-07-13)
parents 6778d68a2c4c
children 3473b453dbae
files linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Wed Jul 13 08:36:38 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Wed Jul 13 08:37:38 2005 +0000
     1.3 @@ -194,16 +194,10 @@ void __init check_efer(void)
     1.4  {
     1.5  	unsigned long efer;
     1.6  
     1.7 -        /*	rdmsrl(MSR_EFER, efer);  */
     1.8 -
     1.9 -        /*
    1.10 -         * At this point, Xen does not like the bit 63.
    1.11 -         * So NX is not supported. Come back later.
    1.12 -         */
    1.13 -        efer = 0;
    1.14 -
    1.15 +	rdmsrl(MSR_EFER, efer); 
    1.16          if (!(efer & EFER_NX) || do_not_nx) { 
    1.17                  __supported_pte_mask &= ~_PAGE_NX; 
    1.18 +
    1.19          }       
    1.20  }
    1.21  
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Wed Jul 13 08:36:38 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Wed Jul 13 08:37:38 2005 +0000
     2.3 @@ -641,8 +641,6 @@ void zap_low_mappings(void)
     2.4  #ifndef CONFIG_DISCONTIGMEM
     2.5  void __init paging_init(void)
     2.6  {
     2.7 -        int i;
     2.8 -
     2.9  	{
    2.10  		unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
    2.11                  /*	unsigned int max_dma; */
    2.12 @@ -664,14 +662,17 @@ void __init paging_init(void)
    2.13          memset(empty_zero_page, 0, sizeof(empty_zero_page));
    2.14  
    2.15  #ifdef CONFIG_XEN_PHYSDEV_ACCESS
    2.16 +	{
    2.17 +		int i;
    2.18          /* Setup mapping of lower 1st MB */
    2.19 -        for (i = 0; i < NR_FIX_ISAMAPS; i++)
    2.20 -                if (xen_start_info.flags & SIF_PRIVILEGED)
    2.21 -                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    2.22 -                else
    2.23 -                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
    2.24 -				     virt_to_machine(empty_zero_page),
    2.25 -				     PAGE_KERNEL_RO);
    2.26 +		for (i = 0; i < NR_FIX_ISAMAPS; i++)
    2.27 +			if (xen_start_info.flags & SIF_PRIVILEGED)
    2.28 +				set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    2.29 +			else
    2.30 +				__set_fixmap(FIX_ISAMAP_BEGIN - i,
    2.31 +					     virt_to_machine(empty_zero_page),
    2.32 +					     PAGE_KERNEL_RO);
    2.33 +	}
    2.34  #endif
    2.35  
    2.36  }