ChangeSet 1.1472.2.6, 2005/05/22 22:33:43-07:00, adsharma@xxxxxxxxxxxxxxxxxxxxxx
vmx_vcpu.h, vmx_phy_mode.c, mkbuildtree, domain.c, Makefile:
Fix VT-i build
Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>
arch/ia64/Makefile | 18 +++++++++++++++---
arch/ia64/domain.c | 20 ++++++++++----------
arch/ia64/tools/mkbuildtree | 10 +++++-----
arch/ia64/vmx_phy_mode.c | 4 ++--
include/asm-ia64/vmx_vcpu.h | 4 ++--
5 files changed, 34 insertions(+), 22 deletions(-)
diff -Nru a/xen/arch/ia64/Makefile b/xen/arch/ia64/Makefile
--- a/xen/arch/ia64/Makefile 2005-05-23 12:04:28 -04:00
+++ b/xen/arch/ia64/Makefile 2005-05-23 12:04:28 -04:00
@@ -30,9 +30,22 @@
-Map map.out head.o $(ALL_OBJS) -o $(TARGET)-syms
$(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $(TARGET)
-asm-offsets.s: asm-offsets.c
+asm-offsets.s: asm-offsets.c $(BASEDIR)/include/asm-ia64/.offsets.h.stamp
$(CC) $(CFLAGS) -S -o $@ $<
+$(BASEDIR)/include/asm-ia64/.offsets.h.stamp:
+# Need such symbol link to make linux headers available
+ [ -e $(BASEDIR)/include/linux ] \
+ || ln -s $(BASEDIR)/include/xen $(BASEDIR)/include/linux
+ [ -e $(BASEDIR)/include/asm-ia64/xen ] \
+ || ln -s $(BASEDIR)/include/asm-ia64/linux
$(BASEDIR)/include/asm-ia64/xen
+# Solve circular reference on asm-offsets.h
+ [ -f $(BASEDIR)/include/asm-ia64/asm-offsets.h ] \
+ || echo "#define IA64_TASK_SIZE 0" >
$(BASEDIR)/include/asm-ia64/asm-offsets.h
+#Bad hack. Force asm-offsets.h out-of-date
+ sleep 1
+ touch $@
+
# I'm sure a Makefile wizard would know a better way to do this
xen.lds.s: xen.lds.S
$(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \
@@ -42,9 +55,8 @@
$(MAKE) -C lib && cp lib/ia64lib.o .
clean:
- rm -f *.o *~ core xen.lds.s
$(BASEDIR)/include/asm-ia64/.offsets.h.stamp
+ rm -f *.o *~ core xen.lds.s
$(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s
rm -f lib/*.o
- $(MAKE) -C lib clean
# setup.o contains bits of compile.h so it must be blown away
delete-unfresh-files:
diff -Nru a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c
--- a/xen/arch/ia64/domain.c 2005-05-23 12:04:28 -04:00
+++ b/xen/arch/ia64/domain.c 2005-05-23 12:04:28 -04:00
@@ -40,6 +40,7 @@
#ifdef CONFIG_VTI
#include <asm/vmx.h>
#include <asm/vmx_vcpu.h>
+#include <asm/pal.h>
#endif // CONFIG_VTI
#define CONFIG_DOMAIN0_CONTIGUOUS
@@ -792,13 +793,15 @@
unsigned long pkern_start;
unsigned long pkern_entry;
unsigned long pkern_end;
+ unsigned long ret;
+ unsigned long progress = 0;
//printf("construct_dom0: starting\n");
/* Sanity! */
#ifndef CLONE_DOMAIN0
if ( d != dom0 )
BUG();
- if ( test_bit(DF_CONSTRUCTED, &d->flags) )
+ if ( test_bit(_DOMF_constructed, &d->domain_flags) )
BUG();
#endif
@@ -888,14 +891,11 @@
/* Copy the initial ramdisk. */
/* Sync d/i cache conservatively */
- {
- unsigned long ret;
- unsigned long progress;
- ret = ia64_pal_cache_flush(4, 0, &progress, NULL);
- if (ret != PAL_STATUS_SUCCESS)
- panic("PAL CACHE FLUSH failed for dom0.\n");
- printk("Sync i/d cache for dom0 image SUCC\n");
- }
+ ret = ia64_pal_cache_flush(4, 0, &progress, NULL);
+ if (ret != PAL_STATUS_SUCCESS)
+ panic("PAL CACHE FLUSH failed for dom0.\n");
+ printk("Sync i/d cache for dom0 image SUCC\n");
+
/* Physical mode emulation initialization, including
* emulation ID allcation and related memory request
*/
@@ -919,8 +919,8 @@
/* vpd is ready now */
vlsapic_reset(ed);
vtm_init(ed);
- set_bit(DF_CONSTRUCTED, &d->flags);
+ set_bit(_DOMF_constructed, &d->domain_flags);
new_thread(ed, pkern_entry, 0, 0);
// FIXME: Hack for keyboard input
diff -Nru a/xen/arch/ia64/tools/mkbuildtree b/xen/arch/ia64/tools/mkbuildtree
--- a/xen/arch/ia64/tools/mkbuildtree 2005-05-23 12:04:28 -04:00
+++ b/xen/arch/ia64/tools/mkbuildtree 2005-05-23 12:04:28 -04:00
@@ -46,13 +46,13 @@
mkdir include/asm-ia64/linux
mkdir include/asm-ia64/linux/byteorder
# use "gcc -Iinclude/asm-ia64" to find these linux includes
-ln -s $XEN/include/xen $XEN/include/linux
-ln -s $XEN/include/asm-ia64/linux $XEN/include/asm-ia64/xen
+#ln -s $XEN/include/xen $XEN/include/linux
+#ln -s $XEN/include/asm-ia64/linux $XEN/include/asm-ia64/xen
# prepare for building asm-offsets (circular dependency)
-echo '#define IA64_TASK_SIZE 0' > include/asm-ia64/asm-offsets.h
-sleep 2
-touch arch/ia64/asm-offsets.c
+#echo '#define IA64_TASK_SIZE 0' > include/asm-ia64/asm-offsets.h
+#sleep 2
+#touch arch/ia64/asm-offsets.c
# patches to xen/common files
#xen_patch common/domain.c domain.c
diff -Nru a/xen/arch/ia64/vmx_phy_mode.c b/xen/arch/ia64/vmx_phy_mode.c
--- a/xen/arch/ia64/vmx_phy_mode.c 2005-05-23 12:04:28 -04:00
+++ b/xen/arch/ia64/vmx_phy_mode.c 2005-05-23 12:04:28 -04:00
@@ -104,7 +104,7 @@
UINT64 psr;
struct domain * d = vcpu->domain;
- vcpu->domain->arch.emul_phy_rr0.rid = XEN_RR7_RID+((d->id)<<3);
+ vcpu->domain->arch.emul_phy_rr0.rid = XEN_RR7_RID+((d->domain_id)<<3);
/* FIXME */
#if 0
vcpu->domain->arch.emul_phy_rr0.ps = 28; /* set page size to 256M */
@@ -112,7 +112,7 @@
vcpu->domain->arch.emul_phy_rr0.ps = EMUL_PHY_PAGE_SHIFT; /* set page
size to 4k */
vcpu->domain->arch.emul_phy_rr0.ve = 1; /* enable VHPT walker on this
region */
- vcpu->domain->arch.emul_phy_rr4.rid = XEN_RR7_RID + ((d->id)<<3) + 4;
+ vcpu->domain->arch.emul_phy_rr4.rid = XEN_RR7_RID + ((d->domain_id)<<3) +
4;
vcpu->domain->arch.emul_phy_rr4.ps = EMUL_PHY_PAGE_SHIFT; /* set page
size to 4k */
vcpu->domain->arch.emul_phy_rr4.ve = 1; /* enable VHPT walker on this
region */
diff -Nru a/xen/include/asm-ia64/vmx_vcpu.h b/xen/include/asm-ia64/vmx_vcpu.h
--- a/xen/include/asm-ia64/vmx_vcpu.h 2005-05-23 12:04:28 -04:00
+++ b/xen/include/asm-ia64/vmx_vcpu.h 2005-05-23 12:04:28 -04:00
@@ -54,7 +54,7 @@
#define VMM_RR_SHIFT 20
#define VMM_RR_MASK ((1UL<<VMM_RR_SHIFT)-1)
#define VRID_2_MRID(vcpu,rid) ((rid) & VMM_RR_MASK) | \
- ((vcpu->domain->id) << VMM_RR_SHIFT)
+ ((vcpu->domain->domain_id) << VMM_RR_SHIFT)
extern u64 indirect_reg_igfld_MASK ( int type, int index, u64 value);
extern u64 cr_igfld_mask (int index, u64 value);
extern int check_indirect_reg_rsv_fields ( int type, int index, u64 value );
@@ -590,7 +590,7 @@
ia64_rr rr;
u64 rid;
rr.rrval=val;
- rid=(((u64)vcpu->domain->id)<<DOMAIN_RID_SHIFT) + rr.rid;
+ rid=(((u64)vcpu->domain->domain_id)<<DOMAIN_RID_SHIFT) + rr.rid;
rr.rid = redistribute_rid(rid);
rr.ve=1;
return rr.rrval;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|