ia64/xen-unstable

changeset 5086:e0e38c5651d3

bitkeeper revision 1.1472.2.6 (42916b37WTfslw9tSflk_BS_9JVW1Q)

vmx_vcpu.h, vmx_phy_mode.c, mkbuildtree, domain.c, Makefile:
Fix VT-i build

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author adsharma@linux-t08.sc.intel.com
date Mon May 23 05:33:43 2005 +0000 (2005-05-23)
parents e5235ca194ca
children 6cbe0dc99129
files xen/arch/ia64/Makefile xen/arch/ia64/domain.c xen/arch/ia64/tools/mkbuildtree xen/arch/ia64/vmx_phy_mode.c xen/include/asm-ia64/vmx_vcpu.h
line diff
     1.1 --- a/xen/arch/ia64/Makefile	Mon May 23 05:26:57 2005 +0000
     1.2 +++ b/xen/arch/ia64/Makefile	Mon May 23 05:33:43 2005 +0000
     1.3 @@ -30,9 +30,22 @@ default: $(OBJS) head.o ia64lib.o xen.ld
     1.4  		-Map map.out head.o $(ALL_OBJS) -o $(TARGET)-syms
     1.5  	$(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $(TARGET)
     1.6  
     1.7 -asm-offsets.s: asm-offsets.c
     1.8 +asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp
     1.9  	$(CC) $(CFLAGS) -S -o $@ $<
    1.10  
    1.11 +$(BASEDIR)/include/asm-ia64/.offsets.h.stamp:
    1.12 +# Need such symbol link to make linux headers available
    1.13 +	[ -e $(BASEDIR)/include/linux ] \
    1.14 +	 || ln -s $(BASEDIR)/include/xen $(BASEDIR)/include/linux
    1.15 +	[ -e $(BASEDIR)/include/asm-ia64/xen ] \
    1.16 +	 || ln -s $(BASEDIR)/include/asm-ia64/linux $(BASEDIR)/include/asm-ia64/xen
    1.17 +# Solve circular reference on asm-offsets.h
    1.18 +	[ -f $(BASEDIR)/include/asm-ia64/asm-offsets.h ] \
    1.19 +	 || echo "#define IA64_TASK_SIZE 0" > $(BASEDIR)/include/asm-ia64/asm-offsets.h
    1.20 +#Bad hack. Force asm-offsets.h out-of-date
    1.21 +	 sleep 1
    1.22 +	 touch $@
    1.23 +
    1.24  # I'm sure a Makefile wizard would know a better way to do this
    1.25  xen.lds.s: xen.lds.S
    1.26  	$(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
    1.27 @@ -42,9 +55,8 @@ ia64lib.o:
    1.28  	$(MAKE) -C lib && cp lib/ia64lib.o .
    1.29  
    1.30  clean:
    1.31 -	rm -f *.o *~ core  xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp
    1.32 +	rm -f *.o *~ core  xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s
    1.33  	rm -f lib/*.o
    1.34 -	$(MAKE) -C lib clean
    1.35  
    1.36  # setup.o contains bits of compile.h so it must be blown away
    1.37  delete-unfresh-files:
     2.1 --- a/xen/arch/ia64/domain.c	Mon May 23 05:26:57 2005 +0000
     2.2 +++ b/xen/arch/ia64/domain.c	Mon May 23 05:33:43 2005 +0000
     2.3 @@ -40,6 +40,7 @@
     2.4  #ifdef CONFIG_VTI
     2.5  #include <asm/vmx.h>
     2.6  #include <asm/vmx_vcpu.h>
     2.7 +#include <asm/pal.h>
     2.8  #endif // CONFIG_VTI
     2.9  
    2.10  #define CONFIG_DOMAIN0_CONTIGUOUS
    2.11 @@ -792,13 +793,15 @@ int construct_dom0(struct domain *d,
    2.12      unsigned long pkern_start;
    2.13      unsigned long pkern_entry;
    2.14      unsigned long pkern_end;
    2.15 +    unsigned long ret;
    2.16 +    unsigned long progress = 0;
    2.17  
    2.18  //printf("construct_dom0: starting\n");
    2.19      /* Sanity! */
    2.20  #ifndef CLONE_DOMAIN0
    2.21      if ( d != dom0 ) 
    2.22          BUG();
    2.23 -    if ( test_bit(DF_CONSTRUCTED, &d->flags) ) 
    2.24 +    if ( test_bit(_DOMF_constructed, &d->domain_flags) ) 
    2.25          BUG();
    2.26  #endif
    2.27  
    2.28 @@ -888,14 +891,11 @@ int construct_dom0(struct domain *d,
    2.29      /* Copy the initial ramdisk. */
    2.30  
    2.31      /* Sync d/i cache conservatively */
    2.32 -    {
    2.33 -        unsigned long ret;
    2.34 -        unsigned long progress;
    2.35 -        ret = ia64_pal_cache_flush(4, 0, &progress, NULL);
    2.36 -        if (ret != PAL_STATUS_SUCCESS)
    2.37 -                panic("PAL CACHE FLUSH failed for dom0.\n");
    2.38 -        printk("Sync i/d cache for dom0 image SUCC\n");
    2.39 -    }
    2.40 +    ret = ia64_pal_cache_flush(4, 0, &progress, NULL);
    2.41 +    if (ret != PAL_STATUS_SUCCESS)
    2.42 +            panic("PAL CACHE FLUSH failed for dom0.\n");
    2.43 +    printk("Sync i/d cache for dom0 image SUCC\n");
    2.44 +
    2.45      /* Physical mode emulation initialization, including
    2.46       * emulation ID allcation and related memory request
    2.47       */
    2.48 @@ -919,8 +919,8 @@ int construct_dom0(struct domain *d,
    2.49      /* vpd is ready now */
    2.50      vlsapic_reset(ed);
    2.51      vtm_init(ed);
    2.52 -    set_bit(DF_CONSTRUCTED, &d->flags);
    2.53  
    2.54 +    set_bit(_DOMF_constructed, &d->domain_flags);
    2.55      new_thread(ed, pkern_entry, 0, 0);
    2.56  
    2.57      // FIXME: Hack for keyboard input
     3.1 --- a/xen/arch/ia64/tools/mkbuildtree	Mon May 23 05:26:57 2005 +0000
     3.2 +++ b/xen/arch/ia64/tools/mkbuildtree	Mon May 23 05:33:43 2005 +0000
     3.3 @@ -46,13 +46,13 @@ mkdir include/asm-generic
     3.4  mkdir include/asm-ia64/linux
     3.5  mkdir include/asm-ia64/linux/byteorder
     3.6  # use "gcc -Iinclude/asm-ia64" to find these linux includes
     3.7 -ln -s $XEN/include/xen $XEN/include/linux
     3.8 -ln -s $XEN/include/asm-ia64/linux $XEN/include/asm-ia64/xen 
     3.9 +#ln -s $XEN/include/xen $XEN/include/linux
    3.10 +#ln -s $XEN/include/asm-ia64/linux $XEN/include/asm-ia64/xen 
    3.11  
    3.12  # prepare for building asm-offsets (circular dependency)
    3.13 -echo '#define IA64_TASK_SIZE 0' > include/asm-ia64/asm-offsets.h
    3.14 -sleep 2
    3.15 -touch arch/ia64/asm-offsets.c
    3.16 +#echo '#define IA64_TASK_SIZE 0' > include/asm-ia64/asm-offsets.h
    3.17 +#sleep 2
    3.18 +#touch arch/ia64/asm-offsets.c
    3.19  
    3.20  # patches to xen/common files
    3.21  #xen_patch common/domain.c domain.c
     4.1 --- a/xen/arch/ia64/vmx_phy_mode.c	Mon May 23 05:26:57 2005 +0000
     4.2 +++ b/xen/arch/ia64/vmx_phy_mode.c	Mon May 23 05:33:43 2005 +0000
     4.3 @@ -104,7 +104,7 @@ physical_mode_init(VCPU *vcpu)
     4.4      UINT64 psr;
     4.5      struct domain * d = vcpu->domain;
     4.6  
     4.7 -    vcpu->domain->arch.emul_phy_rr0.rid = XEN_RR7_RID+((d->id)<<3);
     4.8 +    vcpu->domain->arch.emul_phy_rr0.rid = XEN_RR7_RID+((d->domain_id)<<3);
     4.9      /* FIXME */
    4.10  #if 0
    4.11      vcpu->domain->arch.emul_phy_rr0.ps = 28;  /* set page size to 256M */
    4.12 @@ -112,7 +112,7 @@ physical_mode_init(VCPU *vcpu)
    4.13  	vcpu->domain->arch.emul_phy_rr0.ps = EMUL_PHY_PAGE_SHIFT;  /* set page size to 4k */
    4.14      vcpu->domain->arch.emul_phy_rr0.ve = 1; /* enable VHPT walker on this region */
    4.15  
    4.16 -    vcpu->domain->arch.emul_phy_rr4.rid = XEN_RR7_RID + ((d->id)<<3) + 4;
    4.17 +    vcpu->domain->arch.emul_phy_rr4.rid = XEN_RR7_RID + ((d->domain_id)<<3) + 4;
    4.18      vcpu->domain->arch.emul_phy_rr4.ps = EMUL_PHY_PAGE_SHIFT;  /* set page size to 4k */
    4.19      vcpu->domain->arch.emul_phy_rr4.ve = 1; /* enable VHPT walker on this region */
    4.20  
     5.1 --- a/xen/include/asm-ia64/vmx_vcpu.h	Mon May 23 05:26:57 2005 +0000
     5.2 +++ b/xen/include/asm-ia64/vmx_vcpu.h	Mon May 23 05:33:43 2005 +0000
     5.3 @@ -54,7 +54,7 @@
     5.4  #define VMM_RR_SHIFT    20
     5.5  #define VMM_RR_MASK     ((1UL<<VMM_RR_SHIFT)-1)
     5.6  #define VRID_2_MRID(vcpu,rid)  ((rid) & VMM_RR_MASK) | \
     5.7 -                ((vcpu->domain->id) << VMM_RR_SHIFT)
     5.8 +                ((vcpu->domain->domain_id) << VMM_RR_SHIFT)
     5.9  extern u64 indirect_reg_igfld_MASK ( int type, int index, u64 value);
    5.10  extern u64 cr_igfld_mask (int index, u64 value);
    5.11  extern int check_indirect_reg_rsv_fields ( int type, int index, u64 value );
    5.12 @@ -590,7 +590,7 @@ vmx_vrrtomrr(VCPU *vcpu,unsigned long va
    5.13      ia64_rr rr;
    5.14      u64	  rid;
    5.15      rr.rrval=val;
    5.16 -    rid=(((u64)vcpu->domain->id)<<DOMAIN_RID_SHIFT) + rr.rid;
    5.17 +    rid=(((u64)vcpu->domain->domain_id)<<DOMAIN_RID_SHIFT) + rr.rid;
    5.18      rr.rid = redistribute_rid(rid);
    5.19      rr.ve=1;
    5.20      return rr.rrval;