direct-io.hg

changeset 11349:896fcdd49c7f

[IA64] Modify sparse headers for PV-on-HVM/IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Mon Aug 28 16:16:07 2006 -0600 (2006-08-28)
parents 6bf652c677c8
children 684fdcfb251a
files linux-2.6-xen-sparse/include/asm-ia64/hypercall.h linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Mon Aug 28 16:09:28 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Mon Aug 28 16:16:07 2006 -0600
     1.3 @@ -315,7 +315,9 @@ static inline void exit_idle(void) {}
     1.4  })
     1.5  
     1.6  #include <linux/err.h>
     1.7 +#ifdef CONFIG_XEN
     1.8  #include <asm/xen/privop.h>
     1.9 +#endif /* CONFIG_XEN */
    1.10  
    1.11  static inline unsigned long
    1.12  __HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size)
     2.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Mon Aug 28 16:09:28 2006 -0600
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Mon Aug 28 16:16:07 2006 -0600
     2.3 @@ -33,7 +33,7 @@
     2.4  #ifndef __HYPERVISOR_H__
     2.5  #define __HYPERVISOR_H__
     2.6  
     2.7 -#ifndef CONFIG_XEN
     2.8 +#if !defined(CONFIG_XEN) && !defined(CONFIG_VMX_GUEST)
     2.9  #define is_running_on_xen()			(0)
    2.10  #define HYPERVISOR_ioremap(offset, size)	(offset)
    2.11  #else
    2.12 @@ -41,7 +41,7 @@ extern int running_on_xen;
    2.13  #define is_running_on_xen()			(running_on_xen)
    2.14  #endif
    2.15  
    2.16 -#ifdef CONFIG_XEN
    2.17 +#if defined(CONFIG_XEN) || defined(CONFIG_VMX_GUEST)
    2.18  #include <linux/config.h>
    2.19  #include <linux/types.h>
    2.20  #include <linux/kernel.h>
    2.21 @@ -59,10 +59,9 @@ extern int running_on_xen;
    2.22  extern shared_info_t *HYPERVISOR_shared_info;
    2.23  extern start_info_t *xen_start_info;
    2.24  
    2.25 -#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN)
    2.26 -
    2.27  void force_evtchn_callback(void);
    2.28  
    2.29 +#ifndef CONFIG_VMX_GUEST
    2.30  /* Turn jiffies into Xen system time. XXX Implement me. */
    2.31  #define jiffies_to_st(j)	0
    2.32  
    2.33 @@ -145,10 +144,14 @@ int privcmd_mmap(struct file * file, str
    2.34  #define scrub_pages(_p,_n) ((void)0)
    2.35  #endif
    2.36  #define	pte_mfn(_x)	pte_pfn(_x)
    2.37 -#define __pte_ma(_x)	((pte_t) {(_x)})
    2.38  #define phys_to_machine_mapping_valid(_x)	(1)
    2.39 -#define pfn_pte_ma(_x,_y)	__pte_ma(0)
    2.40  
    2.41 +#endif /* !CONFIG_VMX_GUEST */
    2.42 +
    2.43 +#define __pte_ma(_x)	((pte_t) {(_x)})        /* unmodified use */
    2.44 +#define pfn_pte_ma(_x,_y)	__pte_ma(0)     /* unmodified use */
    2.45 +
    2.46 +#ifndef CONFIG_VMX_GUEST
    2.47  int __xen_create_contiguous_region(unsigned long vstart, unsigned int order, unsigned int address_bits);
    2.48  static inline int
    2.49  xen_create_contiguous_region(unsigned long vstart,
    2.50 @@ -170,6 +173,8 @@ xen_destroy_contiguous_region(unsigned l
    2.51  		__xen_destroy_contiguous_region(vstart, order);
    2.52  }
    2.53  
    2.54 +#endif /* !CONFIG_VMX_GUEST */
    2.55 +
    2.56  // for netfront.c, netback.c
    2.57  #define MULTI_UVMFLAGS_INDEX 0 //XXX any value
    2.58  
    2.59 @@ -182,10 +187,27 @@ MULTI_update_va_mapping(
    2.60  	mcl->result = 0;
    2.61  }
    2.62  
    2.63 +static inline void
    2.64 +MULTI_grant_table_op(multicall_entry_t *mcl, unsigned int cmd,
    2.65 +	void *uop, unsigned int count)
    2.66 +{
    2.67 +	mcl->op = __HYPERVISOR_grant_table_op;
    2.68 +	mcl->args[0] = cmd;
    2.69 +	mcl->args[1] = (unsigned long)uop;
    2.70 +	mcl->args[2] = count;
    2.71 +}
    2.72 +
    2.73  // for debug
    2.74  asmlinkage int xprintk(const char *fmt, ...);
    2.75  #define xprintd(fmt, ...)	xprintk("%s:%d " fmt, __func__, __LINE__, \
    2.76  					##__VA_ARGS__)
    2.77 -#endif /* CONFIG_XEN */
    2.78 +
    2.79 +#endif /* CONFIG_XEN || CONFIG_VMX_GUEST */
    2.80 +
    2.81 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
    2.82 +#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN)
    2.83 +#else
    2.84 +#define is_initial_xendomain() 0
    2.85 +#endif
    2.86  
    2.87  #endif /* __HYPERVISOR_H__ */