diff -r f662f98d594b linux-2.6-xen-sparse/arch/ia64/kernel/setup.c --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Mon Jun 05 14:28:39 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Mon Jun 05 20:50:19 2006 -0600 @@ -519,14 +519,18 @@ setup_arch (char **cmdline_p) } #ifdef CONFIG_XEN if (is_running_on_xen()) { - extern shared_info_t *HYPERVISOR_shared_info; - extern int xen_init (void); - - xen_init (); + shared_info_t *s = HYPERVISOR_shared_info; + + xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT); + xen_start_info->flags = s->arch.flags; + + printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld " + "flags=0x%x\n", s->arch.start_info_pfn, + xen_start_info->nr_pages, xen_start_info->flags); /* xen_start_info isn't setup yet, get the flags manually */ - if (HYPERVISOR_shared_info->arch.flags & SIF_INITDOMAIN) { - if (!(HYPERVISOR_shared_info->arch.flags & SIF_PRIVILEGED)) + if (s->arch.flags & SIF_INITDOMAIN) { + if (!(s->arch.flags & SIF_PRIVILEGED)) panic("Xen granted us console access " "but not privileged status"); } else { diff -r f662f98d594b linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre --- a/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre Mon Jun 05 14:28:39 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre Mon Jun 05 20:50:19 2006 -0600 @@ -16,9 +16,6 @@ ln -sf ../../arch/ia64/xen/drivers/Makef ln -sf ../../arch/ia64/xen/drivers/Makefile drivers/xen/Makefile ln -sf ../../../arch/ia64/xen/drivers/coreMakefile drivers/xen/core/Makefile -#not sure where these ia64-specific files will end up in the future -ln -sf ../../../arch/ia64/xen/drivers/xenia64_init.c drivers/xen/core - #still a few x86-ism's in various drivers/xen files, patch them #cd drivers/xen #if [ ! -e ia64.patch.semaphore ] diff -r f662f98d594b linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile Mon Jun 05 14:28:39 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile Mon Jun 05 20:50:19 2006 -0600 @@ -7,7 +7,6 @@ obj-$(CONFIG_PROC_FS) += xen_proc.o ifeq ($(ARCH),ia64) obj-y += evtchn.o -obj-y += xenia64_init.o ifeq ($(CONFIG_XEN_IA64_DOM0_VP),y) obj-$(CONFIG_NET) += skbuff.o endif diff -r f662f98d594b linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c Mon Jun 05 14:28:39 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c Mon Jun 05 20:50:19 2006 -0600 @@ -23,12 +23,21 @@ //#include #include #include +#include #include #include #include #include #include #include + +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE; +EXPORT_SYMBOL(HYPERVISOR_shared_info); + +start_info_t *xen_start_info; + +int running_on_xen; +EXPORT_SYMBOL(running_on_xen); //XXX xen/ia64 copy_from_guest() is broken. // This is a temporal work around until it is fixed. diff -r f662f98d594b linux-2.6-xen-sparse/arch/ia64/xen/util.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/util.c Mon Jun 05 14:28:39 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/util.c Mon Jun 05 20:50:19 2006 -0600 @@ -104,6 +104,21 @@ void unlock_vm_area(struct vm_struct *ar } EXPORT_SYMBOL_GPL(unlock_vm_area); +#ifndef CONFIG_XEN_IA64_DOM0_VP +/* We just need a range of legal va here, though finally identity + * mapped one is instead used for gnttab mapping. + */ +unsigned long alloc_empty_foreign_map_page_range(unsigned long pages) +{ + struct vm_struct *vma; + + if ( (vma = get_vm_area(PAGE_SIZE * pages, VM_ALLOC)) == NULL ) + return NULL; + + return (unsigned long)vma->addr; +} +#endif + /* * Local variables: * c-file-style: "linux"