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-unstable] [IA64] domheap: Don't pin xenheap down. N

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] domheap: Don't pin xenheap down. Now it's unnecessary.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:11:12 -0800
Delivery-date: Wed, 23 Jan 2008 01:15:37 -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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1200596743 25200
# Node ID af3550f5387484738f67ede0192a514eaebb2993
# Parent  6a7fa7dbde5662618ab710d320479c575ae8a769
[IA64] domheap: Don't pin xenheap down. Now it's unnecessary.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/entry.S   |   27 -------------------
 xen/arch/ia64/linux-xen/head.S    |   29 ++-------------------
 xen/arch/ia64/linux-xen/mca_asm.S |   52 --------------------------------------
 xen/arch/ia64/vmx/vmx_entry.S     |   32 +----------------------
 xen/arch/ia64/vmx/vmx_init.c      |    7 -----
 xen/arch/ia64/xen/xenasm.S        |   22 +---------------
 xen/arch/ia64/xen/xensetup.c      |    2 -
 xen/include/asm-ia64/xenkregs.h   |    5 +--
 8 files changed, 11 insertions(+), 165 deletions(-)

diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/linux-xen/entry.S
--- a/xen/arch/ia64/linux-xen/entry.S   Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/linux-xen/entry.S   Thu Jan 17 12:05:43 2008 -0700
@@ -256,33 +256,6 @@ GLOBAL_ENTRY(ia64_switch_to)
        br.ret.sptk.many rp             // boogie on out in new context
 
 .map:
-#ifdef XEN
-       // in0: next in virtual address which must be in 
-       //      the xen identity mapping area.
-       // r20: physical address of next
-       // r22: ksp offset: used: don't overwrite. will be used later
-       // r24: = THIS_CPU(cpu_kr)+IA64_KR_CURRENT_STACK_OFFSET
-       // r26: (physical address of next) >> IA64_GRANULE_SHIFT
-       //
-       // r8: return value
-       // r13:  thread pointer
-       // r21:  thread pointer for VTi domain ??? can be removed?
-       
-       // avoid overlapping with xenheap TR
-       mov r28=ip                      // get kernel tr area
-       ;;
-       tpa r27=r28                     // convert to physical address
-       ;;
-       dep r25=0,r27,0,KERNEL_TR_PAGE_SHIFT
-       dep r23=0,r20,0,KERNEL_TR_PAGE_SHIFT
-       ;;
-       cmp.eq p7,p6=r25,r23
-       mov r28=-1
-       ;;
-(p7)   st8 [r24]=r28                   // remember we don't map stack.
-(p7)   br.cond.sptk .done
-       ;;
-#endif
        rsm psr.ic                      // interrupts (psr.i) are already 
disabled here
        movl r25=PAGE_KERNEL
 #ifdef XEN     
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/linux-xen/head.S
--- a/xen/arch/ia64/linux-xen/head.S    Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/linux-xen/head.S    Thu Jan 17 12:05:43 2008 -0700
@@ -263,16 +263,6 @@ start_ap:
        itr.d dtr[r16]=r18
        ;;
        srlz.i
-       ;;
-       /* XEN HEAP is identity mapped */
-       mov r16 = IA64_TR_XEN_HEAP_REGS
-       dep r17 = -1, r2, 60, 4
-       ;;
-       mov cr.ifa = r17
-       ;;
-       itr.d dtr[r16]=r18
-       ;;
-       srlz.i
 
        /*
         * Switch into virtual mode:
@@ -335,20 +325,7 @@ 1: // now we are in virtual mode
        ;;
        tpa r3=r2               // r3 == phys addr of task struct
        mov r16=-1
-#ifdef XEN
-       ;;
-       dep r2=-1,r3,60,4       // IMVA of task 
-       // XEN: check overlap with XENHEAP
-       mov r17=ip
-       ;;
-       tpa r17=r17
-       ;;
-       dep r17=0,r17,0,KERNEL_TR_PAGE_SHIFT
-       dep r18=0,r3,0,KERNEL_TR_PAGE_SHIFT
-       ;;
-       cmp.eq p4,p0=r17,r18
-(p4)   br.cond.dpnt .load_current
-#else
+#ifndef XEN
 (isBP) br.cond.dpnt .load_current // BP stack is on region 5 --- no need to 
map it
 #endif
 
@@ -360,7 +337,9 @@ 1:  // now we are in virtual mode
        dep r18=0,r3,0,12
        ;;
        or r18=r17,r18
-#ifndef XEN
+#ifdef XEN
+       dep r2=-1,r3,60,4       // IMVA of task 
+#else
        dep r2=-1,r3,61,3       // IMVA of task
 #endif
        ;;
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/linux-xen/mca_asm.S
--- a/xen/arch/ia64/linux-xen/mca_asm.S Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/linux-xen/mca_asm.S Thu Jan 17 12:05:43 2008 -0700
@@ -279,19 +279,6 @@ 4:
        ;;
        srlz.d
        ;;
-#ifdef XEN
-       /* xen heap is identity mapped */
-       mov r19=ip
-       ;; 
-       dep r17=0,r19,0,KERNEL_TR_PAGE_SHIFT
-       ;; 
-       dep r17=-1,r17,60,4
-       ;; 
-       ptr.d r17,r18
-       ;;
-       srlz.d
-       ;; 
-#endif
        // 2. Purge DTR for PERCPU data.
        movl r16=PERCPU_ADDR
        mov r18=PERCPU_PAGE_SHIFT<<2
@@ -427,18 +414,6 @@ ia64_reload_tr:
        srlz.i
        srlz.d
        ;;
-#ifdef XEN
-       /* xen heap is identity mapped */
-       mov r16=IA64_TR_XEN_HEAP_REGS  
-       dep r17=-1,r17,60,4
-       ;; 
-       mov cr.ifa=r17
-       ;;
-       itr.d dtr[r16]=r18
-       ;;
-       srlz.d
-       ;; 
-#endif
        // 2. Reload DTR register for PERCPU data.
        GET_THIS_PADDR(r2, ia64_mca_per_cpu_pte)
        ;;
@@ -475,29 +450,12 @@ ia64_reload_tr:
        ;;
        // 4. Reload DTR for stack.
 #ifdef XEN
-       // avoid overlapping with xenheap TR
-       mov r17=ip
-       ;;
-       dep r17=0,r17,0,KERNEL_TR_PAGE_SHIFT
-       ;;
-       shr.u r17=r17,IA64_GRANULE_SHIFT
-       ;; 
        // Kernel registers are saved in a per_cpu cpu_kr_ia64_t
        // to allow the kernel registers themselves to be used by domains.
        GET_THIS_PADDR(r2, cpu_kr);;
        add r2=IA64_KR_CURRENT_STACK_OFFSET,r2
        ;;
        ld8 r16=[r2]
-       ;;
-#if KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT
-# error "KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT shouldn't happen"
-#endif
-#if KERNEL_TR_PAGE_SHIFT > IA64_GRANULE_SHIFT
-       dep  r18=0,r16,0,KERNEL_TR_PAGE_SHIFT-IA64_GRANULE_SHIFT
-       ;;
-#endif
-       cmp.eq p7,p0=r17,r18
-(p7)   br.cond.sptk    .reload_vhpt
 #else
        mov r16=IA64_KR(CURRENT_STACK)
 #endif
@@ -524,16 +482,6 @@ ia64_reload_tr:
        // 5. VHPT
 #if VHPT_ENABLED
        GET_VA_VCPU_VHPT_MADDR(r2,r3);;
-       dep r3=0,r2,0,KERNEL_TR_PAGE_SHIFT
-       ;; 
-       dep r3=0,r3,60,4                // physical address of
-                                       // va_vhpt & ~(KERNEL_TR_PAGE_SHIFT - 1)
-       ;;
-       shr.u r3=r3,IA64_GRANULE_SHIFT
-       ;;
-       cmp.eq p7,p0=r3,r17
-(p7)   br.cond.sptk    .overlap_vhpt
-       ;;
 
        // avoid overlapping with stack TR
        shr.u r17=r2,IA64_GRANULE_SHIFT
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/vmx/vmx_entry.S
--- a/xen/arch/ia64/vmx/vmx_entry.S     Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/vmx/vmx_entry.S     Thu Jan 17 12:05:43 2008 -0700
@@ -693,26 +693,10 @@ 1:
        ;;
        itr.d dtr[r16]=r24
        ;;
-       /* xen heap is also identity mapped */
-       mov r16 = IA64_TR_XEN_HEAP_REGS
-       dep r17=-1,r3,60,4
-       ;;
-       ptr.d r17, r18
-       ;;
-       mov cr.ifa=r17
-       ;;
-       itr.d dtr[r16]=r24
-       ;;
 
        // re-pin mapping for stack (current)
-       // unless overlaps with IA64_TR_XEN_HEAP_REGS
        mov r26=IA64_GRANULE_SHIFT<<2
        dep r21=0,r13,60,4              // physical address of "current"
-       ;;
-       dep r3=0,r21,0,KERNEL_TR_PAGE_SHIFT
-       ;; 
-       cmp.eq p7,p0=r2,r3
-(p7)   br.cond.sptk .stack_overlaps
        ;;
        ptr.d   r13,r26
        or r23=r21,r25                  // construct PA | page properties
@@ -721,7 +705,6 @@ 1:
        mov r18=IA64_TR_CURRENT_STACK
        ;;
        itr.d dtr[r18]=r23              // wire in new mapping...
-.stack_overlaps:
 
        // re-pin mappings for per-cpu data
        movl r22 = PERCPU_ADDR
@@ -739,16 +722,13 @@ 1:
        ;;
 
        // re-pin mappings for guest_vhpt
-       // unless overlaps with IA64_TR_XEN_HEAP_REGS or IA64_TR_CURRENT_STACK
-       dep r18=0,loc5,0,KERNEL_TR_PAGE_SHIFT
+       // unless overlaps with IA64_TR_CURRENT_STACK
        // r21 = (current physical addr) & (IA64_GRANULE_SIZE - 1)
        dep r21=0,r21,0,IA64_GRANULE_SHIFT 
        // r17 = (guest_vhpt physical addr) & (IA64_GRANULE_SIZE - 1)
        dep r17=0,loc5,0,IA64_GRANULE_SHIFT 
        ;;
-       cmp.eq p6,p0=r18,r2             // check overlap with xen heap
        cmp.eq p7,p0=r17,r21            // check overlap with current stack
-(p6)   br.cond.sptk .vhpt_overlaps
 (p7)   br.cond.sptk .vhpt_overlaps
        mov r24=IA64_TR_VHPT
        ;;
@@ -780,18 +760,11 @@ 1:
        // r16, r19, r20 are used by
        //  ia64_switch_mode_phys()/ia64_switch_mode_virt()
        // re-pin mappings for privregs
-       // r2   = ia64_tpa(ip) & (KERNEL_TR_PAGE_SIZE - 1)
        // r21  = (current physical addr) & (IA64_GRANULE_SIZE - 1)
        // r17  = (guest_vhpt physical addr) & (IA64_GRANULE_SIZE - 1)
-
-       // r24  = (privregs physical addr) & (KERNEL_TR_PAGE_SIZE - 1)
        // loc6 = (((pal phys addr) & (IA64_GRANULE_SIZE - 1) << 2)) | 
PAGE_KERNEL
        // loc7 = (privregs physical addr) & (IA64_GRANULE_SIZE - 1)
-       dep r24 = 0,loc7,0,KERNEL_TR_PAGE_SHIFT
-       ;;
-       cmp.ne p6,p0=r24,r2             // check overlap with xen heap
-       ;; 
-(p6)   cmp.ne.unc p7,p0=r21,loc7       // check overlap with current stack
+       cmp.ne.unc p7,p0=r21,loc7       // check overlap with current stack
        ;;
 (p7)   cmp.ne.unc p8,p0=r17,loc7       // check overlap with guest_vhpt
        ;;
@@ -812,7 +785,6 @@ 1:
        ;;
 (p8)   itr.d dtr[r24]=loc7         // wire in new mapping...
        ;;
-.privregs_overlaps:
 
        // done, switch back to virtual and return
        mov r16=loc4                    // r16= original psr
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/vmx/vmx_init.c
--- a/xen/arch/ia64/vmx/vmx_init.c      Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/vmx/vmx_init.c      Thu Jan 17 12:05:43 2008 -0700
@@ -210,13 +210,6 @@ __vmx_vpd_pin(struct vcpu* v)
        unsigned long privregs = (unsigned long)v->arch.privregs;
        u64 psr;
        
-       // check overlapping with xenheap
-       if ((privregs &
-            ~(KERNEL_TR_PAGE_SIZE - 1)) ==
-           ((unsigned long)__va(ia64_tpa(current_text_addr())) &
-            ~(KERNEL_TR_PAGE_SIZE - 1)))
-               return;
-               
        privregs &= ~(IA64_GRANULE_SIZE - 1);
 
        // check overlapping with current stack
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/xen/xenasm.S
--- a/xen/arch/ia64/xen/xenasm.S        Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/xen/xenasm.S        Thu Jan 17 12:05:43 2008 -0700
@@ -93,22 +93,8 @@ 1:
        ;; 
        itr.d dtr[r16]=r18
        ;;
-       /* xen heap is also identity mapped */
-       mov r16 = IA64_TR_XEN_HEAP_REGS  
-       dep r17=-1,loc6,60,4
-       ;;
-       ptr.d r17,r24
-       ;;
-       mov cr.ifa=r17
-       ;;
-       itr.d dtr[r16]=r18
-       ;;
+
        // re-pin mappings for stack (current)
-       // unless overlaps with IA64_TR_XEN_HEAP_REGS
-       dep r18=0,r13,0,KERNEL_TR_PAGE_SHIFT
-       ;;
-       cmp.eq p7,p0=r17,r18
-(p7)   br.cond.sptk    .stack_overlaps
        mov r25=IA64_GRANULE_SHIFT<<2
        dep r21=0,r13,60,4              // physical address of "current"
        ;;
@@ -121,7 +107,6 @@ 1:
        itr.d dtr[r21]=r23              // wire in new mapping...
 
        //  Per-cpu     
-.stack_overlaps:
        mov r24=PERCPU_PAGE_SHIFT<<2
        movl r22=PERCPU_ADDR
        ;;
@@ -138,14 +123,11 @@ 1:
 #if IA64_GRANULE_SHIFT < VHPT_SIZE_LOG2
 #error "it must be that VHPT_SIZE_LOG2 <= IA64_GRANULE_SHIFT"
 #endif 
-       // unless overlaps with KERNEL_TR and IA64_TR_CURRENT_STACK
-       dep r14=0,in4,0,KERNEL_TR_PAGE_SHIFT
+       // unless overlaps with IA64_TR_CURRENT_STACK
        dep r15=0,in4,0,IA64_GRANULE_SHIFT
        dep r21=0,r13,0,IA64_GRANULE_SHIFT
        ;;
-       cmp.eq p7,p0=r17,r14
        cmp.eq p8,p0=r15,r21
-(p7)   br.cond.sptk    .vhpt_overlaps
 (p8)   br.cond.sptk    .vhpt_overlaps
        mov r21=IA64_TR_VHPT
        dep r22=0,r15,60,4              // physical address of
diff -r 6a7fa7dbde56 -r af3550f53874 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/xen/xensetup.c      Thu Jan 17 12:05:43 2008 -0700
@@ -328,7 +328,7 @@ void __init start_kernel(void)
     }
 
     printk("Xen command line: %s\n", saved_command_line);
-    /* xenheap should be in same TR-covered range with xen image */
+
     xenheap_phys_end = xen_pstart + xenheap_size;
     printk("xen image pstart: 0x%lx, xenheap pend: 0x%lx\n",
            xen_pstart, xenheap_phys_end);
diff -r 6a7fa7dbde56 -r af3550f53874 xen/include/asm-ia64/xenkregs.h
--- a/xen/include/asm-ia64/xenkregs.h   Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/include/asm-ia64/xenkregs.h   Thu Jan 17 12:05:43 2008 -0700
@@ -4,10 +4,9 @@
 /*
  * Translation registers:
  */
-#define IA64_TR_XEN_HEAP_REGS  3       /* dtr3: xen heap identity mapped regs 
*/
+#define IA64_TR_MAPPED_REGS    3       /* dtr3: vcpu mapped regs */
 #define IA64_TR_SHARED_INFO    4       /* dtr4: page shared with domain */
-#define IA64_TR_MAPPED_REGS    5       /* dtr5: vcpu mapped regs */
-#define        IA64_TR_VHPT            6       /* dtr6: vhpt */
+#define IA64_TR_VHPT           5       /* dtr5: vhpt */
 
 #define IA64_TR_VPD            2       /* itr2: vpd */
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] domheap: Don't pin xenheap down. Now it's unnecessary., Xen patchbot-unstable <=