ia64/xen-unstable

changeset 8817:754079886035

Remove defunct compile option CONFIG_XEN_SHADOW_MODE.
It has been superceded by run-time flag
XENFEAT_auto_translated_physmap.

This patch changes behaviour slightly:
1. set_pmd/set_pgd/set_pud always use mmu_ops, even when
XENFEAT_writable_page_tables is available. Unclear whether
we want to add a test to avoid this.
2. xen_l1_entry_update always uses mmu_op. Again, could gate
this on XENFEAT_writable_page_tables.
3. We always pin/unpin pagetables. Could gate this on a
new XENFEAT flag.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Feb 09 20:25:33 2006 +0100 (2006-02-09)
parents 1c69197d29b7
children 2ca9bb802ff7
files buildconfigs/linux-defconfig_xen0_x86_32 buildconfigs/linux-defconfig_xen0_x86_64 buildconfigs/linux-defconfig_xenU_x86_32 buildconfigs/linux-defconfig_xenU_x86_64 buildconfigs/linux-defconfig_xen_x86_32 buildconfigs/linux-defconfig_xen_x86_64 linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c linux-2.6-xen-sparse/drivers/xen/Kconfig linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h
line diff
     1.1 --- a/buildconfigs/linux-defconfig_xen0_x86_32	Thu Feb 09 18:35:15 2006 +0100
     1.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_32	Thu Feb 09 20:25:33 2006 +0100
     1.3 @@ -1317,7 +1317,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     1.4  CONFIG_XEN_NETDEV_FRONTEND=y
     1.5  # CONFIG_XEN_BLKDEV_TAP is not set
     1.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     1.7 -# CONFIG_XEN_SHADOW_MODE is not set
     1.8  CONFIG_XEN_SCRUB_PAGES=y
     1.9  CONFIG_XEN_DISABLE_SERIAL=y
    1.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     2.1 --- a/buildconfigs/linux-defconfig_xen0_x86_64	Thu Feb 09 18:35:15 2006 +0100
     2.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_64	Thu Feb 09 20:25:33 2006 +0100
     2.3 @@ -1242,7 +1242,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     2.4  CONFIG_XEN_NETDEV_FRONTEND=y
     2.5  # CONFIG_XEN_BLKDEV_TAP is not set
     2.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     2.7 -# CONFIG_XEN_SHADOW_MODE is not set
     2.8  CONFIG_XEN_SCRUB_PAGES=y
     2.9  CONFIG_XEN_DISABLE_SERIAL=y
    2.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     3.1 --- a/buildconfigs/linux-defconfig_xenU_x86_32	Thu Feb 09 18:35:15 2006 +0100
     3.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_32	Thu Feb 09 20:25:33 2006 +0100
     3.3 @@ -864,7 +864,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     3.4  CONFIG_XEN_NETDEV_FRONTEND=y
     3.5  # CONFIG_XEN_BLKDEV_TAP is not set
     3.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     3.7 -# CONFIG_XEN_SHADOW_MODE is not set
     3.8  CONFIG_XEN_SCRUB_PAGES=y
     3.9  CONFIG_XEN_DISABLE_SERIAL=y
    3.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     4.1 --- a/buildconfigs/linux-defconfig_xenU_x86_64	Thu Feb 09 18:35:15 2006 +0100
     4.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_64	Thu Feb 09 20:25:33 2006 +0100
     4.3 @@ -1142,7 +1142,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     4.4  CONFIG_XEN_NETDEV_FRONTEND=y
     4.5  # CONFIG_XEN_BLKDEV_TAP is not set
     4.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     4.7 -# CONFIG_XEN_SHADOW_MODE is not set
     4.8  CONFIG_XEN_SCRUB_PAGES=y
     4.9  CONFIG_XEN_DISABLE_SERIAL=y
    4.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     5.1 --- a/buildconfigs/linux-defconfig_xen_x86_32	Thu Feb 09 18:35:15 2006 +0100
     5.2 +++ b/buildconfigs/linux-defconfig_xen_x86_32	Thu Feb 09 20:25:33 2006 +0100
     5.3 @@ -2999,7 +2999,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     5.4  CONFIG_XEN_NETDEV_FRONTEND=y
     5.5  # CONFIG_XEN_BLKDEV_TAP is not set
     5.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     5.7 -# CONFIG_XEN_SHADOW_MODE is not set
     5.8  CONFIG_XEN_SCRUB_PAGES=y
     5.9  CONFIG_XEN_DISABLE_SERIAL=y
    5.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     6.1 --- a/buildconfigs/linux-defconfig_xen_x86_64	Thu Feb 09 18:35:15 2006 +0100
     6.2 +++ b/buildconfigs/linux-defconfig_xen_x86_64	Thu Feb 09 20:25:33 2006 +0100
     6.3 @@ -2674,7 +2674,6 @@ CONFIG_XEN_BLKDEV_FRONTEND=y
     6.4  CONFIG_XEN_NETDEV_FRONTEND=y
     6.5  # CONFIG_XEN_BLKDEV_TAP is not set
     6.6  # CONFIG_XEN_TPMDEV_FRONTEND is not set
     6.7 -# CONFIG_XEN_SHADOW_MODE is not set
     6.8  CONFIG_XEN_SCRUB_PAGES=y
     6.9  CONFIG_XEN_DISABLE_SERIAL=y
    6.10  CONFIG_HAVE_ARCH_ALLOC_SKB=y
     7.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Thu Feb 09 18:35:15 2006 +0100
     7.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Thu Feb 09 20:25:33 2006 +0100
     7.3 @@ -11,9 +11,6 @@
     7.4  #else
     7.5  	.ascii	",PAE=no"
     7.6  #endif
     7.7 -#ifdef CONFIG_XEN_SHADOW_MODE
     7.8 -	.ascii	",SHADOW=translate"
     7.9 -#endif
    7.10  	.ascii	",LOADER=generic"
    7.11  	.byte	0
    7.12  
     8.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c	Thu Feb 09 18:35:15 2006 +0100
     8.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c	Thu Feb 09 20:25:33 2006 +0100
     8.3 @@ -52,7 +52,6 @@
     8.4  #endif
     8.5  #endif
     8.6  
     8.7 -#ifndef CONFIG_XEN_SHADOW_MODE
     8.8  void xen_l1_entry_update(pte_t *ptr, pte_t val)
     8.9  {
    8.10  	mmu_update_t u;
    8.11 @@ -96,7 +95,6 @@ void xen_l4_entry_update(pgd_t *ptr, pgd
    8.12  	BUG_ON(HYPERVISOR_mmu_update(&u, 1, NULL, DOMID_SELF) < 0);
    8.13  }
    8.14  #endif /* CONFIG_X86_64 */
    8.15 -#endif /* CONFIG_XEN_SHADOW_MODE */
    8.16  
    8.17  void xen_machphys_update(unsigned long mfn, unsigned long pfn)
    8.18  {
    8.19 @@ -181,7 +179,6 @@ void xen_invlpg_mask(cpumask_t *mask, un
    8.20  
    8.21  #endif /* CONFIG_SMP */
    8.22  
    8.23 -#ifndef CONFIG_XEN_SHADOW_MODE
    8.24  void xen_pgd_pin(unsigned long ptr)
    8.25  {
    8.26  	struct mmuext_op op;
    8.27 @@ -253,7 +250,6 @@ void xen_pmd_unpin(unsigned long ptr)
    8.28  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
    8.29  }
    8.30  #endif /* CONFIG_X86_64 */
    8.31 -#endif /* CONFIG_XEN_SHADOW_MODE */
    8.32  
    8.33  void xen_set_ldt(unsigned long ptr, unsigned long len)
    8.34  {
     9.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c	Thu Feb 09 18:35:15 2006 +0100
     9.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c	Thu Feb 09 20:25:33 2006 +0100
     9.3 @@ -402,7 +402,6 @@ void pgd_free(pgd_t *pgd)
     9.4  	kmem_cache_free(pgd_cache, pgd);
     9.5  }
     9.6  
     9.7 -#ifndef CONFIG_XEN_SHADOW_MODE
     9.8  void make_lowmem_page_readonly(void *va, unsigned int feature)
     9.9  {
    9.10  	pte_t *pte;
    9.11 @@ -500,7 +499,6 @@ void make_pages_writable(void *va, unsig
    9.12  		va = (void *)((unsigned long)va + PAGE_SIZE);
    9.13  	}
    9.14  }
    9.15 -#endif /* CONFIG_XEN_SHADOW_MODE */
    9.16  
    9.17  static inline void pgd_walk_set_prot(void *pt, pgprot_t flags)
    9.18  {
    10.1 --- a/linux-2.6-xen-sparse/drivers/xen/Kconfig	Thu Feb 09 18:35:15 2006 +0100
    10.2 +++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig	Thu Feb 09 20:25:33 2006 +0100
    10.3 @@ -123,13 +123,6 @@ config XEN_TPMDEV_FRONTEND
    10.4  	help
    10.5  	  The TPM-device frontend driver.
    10.6  
    10.7 -config XEN_SHADOW_MODE
    10.8 -	bool "Fake shadow mode"
    10.9 -	default n
   10.10 -	help
   10.11 -	  Fakes out a shadow mode kernel
   10.12 -
   10.13 -
   10.14  config XEN_SCRUB_PAGES
   10.15  	bool "Scrub memory before freeing it to Xen"
   10.16  	default y
    11.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Thu Feb 09 18:35:15 2006 +0100
    11.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Thu Feb 09 20:25:33 2006 +0100
    11.3 @@ -76,7 +76,6 @@ void xen_load_gs(unsigned int selector);
    11.4  void xen_tlb_flush(void);
    11.5  void xen_invlpg(unsigned long ptr);
    11.6  
    11.7 -#ifndef CONFIG_XEN_SHADOW_MODE
    11.8  void xen_l1_entry_update(pte_t *ptr, pte_t val);
    11.9  void xen_l2_entry_update(pmd_t *ptr, pmd_t val);
   11.10  void xen_l3_entry_update(pud_t *ptr, pud_t val); /* x86_64/PAE */
   11.11 @@ -89,14 +88,6 @@ void xen_pmd_pin(unsigned long ptr); /* 
   11.12  void xen_pmd_unpin(unsigned long ptr); /* x86_64 only */
   11.13  void xen_pte_pin(unsigned long ptr);
   11.14  void xen_pte_unpin(unsigned long ptr);
   11.15 -#else
   11.16 -#define xen_l1_entry_update(_p, _v) set_pte((_p), (_v))
   11.17 -#define xen_l2_entry_update(_p, _v) set_pgd((_p), (_v))
   11.18 -#define xen_pgd_pin(_p)   ((void)0)
   11.19 -#define xen_pgd_unpin(_p) ((void)0)
   11.20 -#define xen_pte_pin(_p)   ((void)0)
   11.21 -#define xen_pte_unpin(_p) ((void)0)
   11.22 -#endif
   11.23  
   11.24  void xen_set_ldt(unsigned long ptr, unsigned long bytes);
   11.25  void xen_machphys_update(unsigned long mfn, unsigned long pfn);
    12.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h	Thu Feb 09 18:35:15 2006 +0100
    12.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h	Thu Feb 09 20:25:33 2006 +0100
    12.3 @@ -31,11 +31,7 @@
    12.4  
    12.5  #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
    12.6  
    12.7 -#ifndef CONFIG_XEN_SHADOW_MODE
    12.8  #define set_pmd(pmdptr, pmdval) xen_l2_entry_update((pmdptr), (pmdval))
    12.9 -#else
   12.10 -#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
   12.11 -#endif
   12.12  
   12.13  #define ptep_get_and_clear(mm,addr,xp)	__pte_ma(xchg(&(xp)->pte_low, 0))
   12.14  #define pte_same(a, b)		((a).pte_low == (b).pte_low)
    13.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h	Thu Feb 09 18:35:15 2006 +0100
    13.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h	Thu Feb 09 20:25:33 2006 +0100
    13.3 @@ -83,17 +83,10 @@ static inline void set_pte(pte_t *ptep, 
    13.4  	}								\
    13.5  } while (0)
    13.6  
    13.7 -#ifdef CONFIG_XEN_SHADOW_MODE
    13.8 -# define set_pmd(pmdptr,pmdval) \
    13.9 -		set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval))
   13.10 -# define set_pud(pudptr,pudval) \
   13.11 -		(*(pudptr) = (pudval))
   13.12 -#else
   13.13 -# define set_pmd(pmdptr,pmdval)				\
   13.14 +#define set_pmd(pmdptr,pmdval)				\
   13.15  		xen_l2_entry_update((pmdptr), (pmdval))
   13.16 -# define set_pud(pudptr,pudval) \
   13.17 +#define set_pud(pudptr,pudval) \
   13.18  		xen_l3_entry_update((pudptr), (pudval))
   13.19 -#endif
   13.20  
   13.21  /*
   13.22   * Pentium-II erratum A13: in PAE mode we explicitly have to flush