ia64/xen-unstable

changeset 6723:d4d880fcef28

Xen-ia64-specific changes to adapt to recent xen-unstable changes
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Fri Sep 09 10:31:36 2005 -0600 (2005-09-09)
parents b2f4823b6ff0
children b35215021b32
files xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/hypercall.c xen/arch/ia64/xen/xensetup.c xen/include/asm-ia64/mm.h xen/include/asm-ia64/xenpage.h xen/include/asm-ia64/xensystem.h
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Fri Sep 09 10:30:54 2005 -0600
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Fri Sep 09 10:31:36 2005 -0600
     1.3 @@ -1101,3 +1101,19 @@ void vcpu_migrate_cpu(struct vcpu *v, in
     1.4  	set_bit(_VCPUF_cpu_migrated, &v->vcpu_flags);
     1.5  	v->processor = newcpu;
     1.6  }
     1.7 +
     1.8 +void sync_vcpu_execstate(struct vcpu *v)
     1.9 +{
    1.10 +	ia64_save_fpu(v->arch._thread.fph);
    1.11 +#ifdef CONFIG_VTI
    1.12 +	if (VMX_DOMAIN(v))
    1.13 +		vmx_save_state(v);
    1.14 +#else
    1.15 +	if (0) do {} while(0);
    1.16 +#endif
    1.17 +	else {
    1.18 +		if (IA64_HAS_EXTRA_STATE(v))
    1.19 +			ia64_save_extra(v);
    1.20 +	}
    1.21 +	// FIXME SMP: Anything else needed here for SMP?
    1.22 +}
     2.1 --- a/xen/arch/ia64/xen/hypercall.c	Fri Sep 09 10:30:54 2005 -0600
     2.2 +++ b/xen/arch/ia64/xen/hypercall.c	Fri Sep 09 10:31:36 2005 -0600
     2.3 @@ -151,7 +151,7 @@ ia64_hypercall (struct pt_regs *regs)
     2.4  		regs->r8 = do_dom0_op(regs->r14);
     2.5  		break;
     2.6  
     2.7 -	    case __HYPERVISOR_dom_mem_op:
     2.8 +	    case __HYPERVISOR_memory_op:
     2.9  #ifdef CONFIG_VTI
    2.10  		regs->r8 = do_dom_mem_op(regs->r14, regs->r15, regs->r16, regs->r17, regs->r18); 
    2.11  #else
     3.1 --- a/xen/arch/ia64/xen/xensetup.c	Fri Sep 09 10:30:54 2005 -0600
     3.2 +++ b/xen/arch/ia64/xen/xensetup.c	Fri Sep 09 10:31:36 2005 -0600
     3.3 @@ -11,6 +11,7 @@
     3.4  #include <xen/multiboot.h>
     3.5  #include <xen/sched.h>
     3.6  #include <xen/mm.h>
     3.7 +#include <public/version.h>
     3.8  //#include <xen/delay.h>
     3.9  #include <xen/compile.h>
    3.10  //#include <xen/console.h>
    3.11 @@ -384,3 +385,17 @@ printk("About to call init_trace_bufs()\
    3.12  printk("About to call startup_cpu_idle_loop()\n");
    3.13      startup_cpu_idle_loop();
    3.14  }
    3.15 +
    3.16 +void arch_get_xen_caps(xen_capabilities_info_t *info)
    3.17 +{
    3.18 +    char *p=info->caps;
    3.19 +
    3.20 +    *p=0;
    3.21 +
    3.22 +    p+=sprintf(p,"xen_%d.%d_ia64 ",XEN_VERSION,XEN_SUBVERSION);
    3.23 +
    3.24 +    BUG_ON((p-info->caps)>sizeof(*info));
    3.25 +
    3.26 +    if(p>info->caps) *(p-1) = 0;
    3.27 +}
    3.28 +
     4.1 --- a/xen/include/asm-ia64/mm.h	Fri Sep 09 10:30:54 2005 -0600
     4.2 +++ b/xen/include/asm-ia64/mm.h	Fri Sep 09 10:31:36 2005 -0600
     4.3 @@ -415,7 +415,7 @@ extern unsigned long *mpt_table;
     4.4  /* If pmt table is provided by control pannel later, we need __get_user
     4.5  * here. However if it's allocated by HV, we should access it directly
     4.6  */
     4.7 -#define phys_to_machine_mapping(d, gpfn)			\
     4.8 +#define get_mfn_from_pfn(d, gpfn)			\
     4.9      ((d) == dom0 ? gpfn : 					\
    4.10  	(gpfn <= d->arch.max_pfn ? (d)->arch.pmt[(gpfn)] :	\
    4.11  		INVALID_MFN))
    4.12 @@ -424,7 +424,7 @@ extern unsigned long *mpt_table;
    4.13      machine_to_phys_mapping[(mfn)]
    4.14  
    4.15  #define __gpfn_to_mfn(_d, gpfn)			\
    4.16 -    phys_to_machine_mapping((_d), (gpfn))
    4.17 +    get_mfn_from_pfn((_d), (gpfn))
    4.18  
    4.19  #define __gpfn_invalid(_d, gpfn)			\
    4.20  	(__gpfn_to_mfn((_d), (gpfn)) & GPFN_INV_MASK)
     5.1 --- a/xen/include/asm-ia64/xenpage.h	Fri Sep 09 10:30:54 2005 -0600
     5.2 +++ b/xen/include/asm-ia64/xenpage.h	Fri Sep 09 10:31:36 2005 -0600
     5.3 @@ -29,6 +29,25 @@ typedef union xen_va {
     5.4  	unsigned long l;
     5.5  	void *p;
     5.6  } xen_va;
     5.7 +
     5.8 +static inline int get_order_from_bytes(physaddr_t size)
     5.9 +{
    5.10 +    int order;
    5.11 +    size = (size-1) >> PAGE_SHIFT;
    5.12 +    for ( order = 0; size; order++ )
    5.13 +        size >>= 1;
    5.14 +    return order;
    5.15 +}
    5.16 +
    5.17 +static inline int get_order_from_pages(unsigned long nr_pages)
    5.18 +{
    5.19 +    int order;
    5.20 +    nr_pages--;
    5.21 +    for ( order = 0; nr_pages; order++ )
    5.22 +        nr_pages >>= 1;
    5.23 +    return order;
    5.24 +}
    5.25 +
    5.26  #endif
    5.27  
    5.28  #undef __pa
     6.1 --- a/xen/include/asm-ia64/xensystem.h	Fri Sep 09 10:30:54 2005 -0600
     6.2 +++ b/xen/include/asm-ia64/xensystem.h	Fri Sep 09 10:31:36 2005 -0600
     6.3 @@ -22,6 +22,7 @@
     6.4  #endif // CONFIG_VTI
     6.5  
     6.6  #define XEN_START_ADDR		 0xf000000000000000
     6.7 +#define HYPERVISOR_VIRT_START	 0xf000000000000000
     6.8  #undef KERNEL_START
     6.9  #define KERNEL_START		 0xf000000004000000
    6.10  #undef PERCPU_ADDR