ia64/linux-2.6.18-xen.hg

changeset 776:93ea69924241

Sync Xen public memory.h header file.

Remove ia64 translations of removed hypercall structs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 14 11:44:54 2009 +0000 (2009-01-14)
parents 107e10e0e07c
children 8081d19dce89
files arch/ia64/xen/xcom_privcmd.c include/xen/interface/memory.h
line diff
     1.1 --- a/arch/ia64/xen/xcom_privcmd.c	Tue Jan 13 15:17:54 2009 +0000
     1.2 +++ b/arch/ia64/xen/xcom_privcmd.c	Wed Jan 14 11:44:54 2009 +0000
     1.3 @@ -565,80 +565,12 @@ xencomm_privcmd_memory_op(privcmd_hyperc
     1.4  
     1.5  		return ret;
     1.6  	}
     1.7 -	case XENMEM_translate_gpfn_list:
     1.8 -	{
     1.9 -		xen_translate_gpfn_list_t kern_op;
    1.10 -		xen_translate_gpfn_list_t __user *user_op;
    1.11 -		struct xencomm_handle *desc_gpfn = NULL;
    1.12 -		struct xencomm_handle *desc_mfn = NULL;
    1.13 -		struct xencomm_handle *desc_op;
    1.14 -		void *addr;
    1.15 -
    1.16 -		user_op = (xen_translate_gpfn_list_t __user *)
    1.17 -			hypercall->arg[1];
    1.18 -		if (copy_from_user(&kern_op, user_op,
    1.19 -		                   sizeof(xen_translate_gpfn_list_t)))
    1.20 -			return -EFAULT;
    1.21 -		desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
    1.22 -
    1.23 -		if (kern_op.nr_gpfns) {
    1.24 -			/* gpfn_list.  */
    1.25 -			addr = xen_guest_handle(kern_op.gpfn_list);
    1.26 -
    1.27 -			desc_gpfn = xencomm_map(addr, kern_op.nr_gpfns *
    1.28 -			                     sizeof(*xen_guest_handle
    1.29 -			                            (kern_op.gpfn_list)));
    1.30 -			if (addr != NULL && kern_op.nr_gpfns > 0 &&
    1.31 -			    desc_gpfn == NULL)
    1.32 -				return -ENOMEM;
    1.33 -			set_xen_guest_handle(kern_op.gpfn_list,
    1.34 -			                     (void *)desc_gpfn);
    1.35 -
    1.36 -			/* mfn_list.  */
    1.37 -			addr = xen_guest_handle(kern_op.mfn_list);
    1.38 -
    1.39 -			desc_mfn = xencomm_map(addr, kern_op.nr_gpfns *
    1.40 -			                     sizeof(*xen_guest_handle
    1.41 -			                            (kern_op.mfn_list)));
    1.42 -			if (addr != NULL && kern_op.nr_gpfns > 0 &&
    1.43 -			    desc_mfn == NULL) {
    1.44 -				xencomm_free(desc_gpfn);
    1.45 -				return -ENOMEM;
    1.46 -			}
    1.47 -
    1.48 -			set_xen_guest_handle(kern_op.mfn_list,
    1.49 -			                     (void *)desc_mfn);
    1.50 -		}
    1.51 -
    1.52 -		ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
    1.53 -
    1.54 -		xencomm_free(desc_gpfn);
    1.55 -		xencomm_free(desc_mfn);
    1.56 -
    1.57 -		if (ret != 0)
    1.58 -			return ret;
    1.59 -
    1.60 -		return ret;
    1.61 -	}
    1.62  	case XENMEM_add_to_physmap:
    1.63 -	case XENMEM_remove_from_physmap:
    1.64  	{
    1.65  		void __user *arg = (void __user *)hypercall->arg[1];
    1.66 -		size_t argsize;
    1.67  		struct xencomm_handle *desc;
    1.68  
    1.69 -		switch (cmd) {
    1.70 -		case XENMEM_add_to_physmap: 
    1.71 -			argsize = sizeof(struct xen_add_to_physmap);
    1.72 -			break;
    1.73 -		case XENMEM_remove_from_physmap:
    1.74 -			argsize = sizeof(struct xen_remove_from_physmap);
    1.75 -			break;
    1.76 -		default:
    1.77 -			BUG();
    1.78 -		}
    1.79 -
    1.80 -		desc = xencomm_map(arg, argsize);
    1.81 +		desc = xencomm_map(arg, sizeof(struct xen_add_to_physmap));
    1.82  		if (desc == NULL)
    1.83  			return -ENOMEM;
    1.84  
     2.1 --- a/include/xen/interface/memory.h	Tue Jan 13 15:17:54 2009 +0000
     2.2 +++ b/include/xen/interface/memory.h	Wed Jan 14 11:44:54 2009 +0000
     2.3 @@ -48,6 +48,8 @@
     2.4  /* NUMA node to allocate from. */
     2.5  #define XENMEMF_node(x)     (((x) + 1) << 8)
     2.6  #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
     2.7 +/* Flag to populate physmap with populate-on-demand entries */
     2.8 +#define XENMEMF_populate_on_demand (1<<16)
     2.9  #endif
    2.10  
    2.11  struct xen_memory_reservation {
    2.12 @@ -204,7 +206,7 @@ struct xen_add_to_physmap {
    2.13      /* Source mapping space. */
    2.14  #define XENMAPSPACE_shared_info 0 /* shared info page */
    2.15  #define XENMAPSPACE_grant_table 1 /* grant table page */
    2.16 -#define XENMAPSPACE_mfn         2 /* usual MFN */
    2.17 +#define XENMAPSPACE_gmfn        2 /* GMFN */
    2.18      unsigned int space;
    2.19  
    2.20      /* Index into source mapping space. */
    2.21 @@ -216,45 +218,8 @@ struct xen_add_to_physmap {
    2.22  typedef struct xen_add_to_physmap xen_add_to_physmap_t;
    2.23  DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
    2.24  
    2.25 -/*
    2.26 - * Unmaps the page appearing at a particular GPFN from the specified guest's
    2.27 - * pseudophysical address space.
    2.28 - * arg == addr of xen_remove_from_physmap_t.
    2.29 - */
    2.30 -#define XENMEM_remove_from_physmap      15
    2.31 -struct xen_remove_from_physmap {
    2.32 -    /* Which domain to change the mapping for. */
    2.33 -    domid_t domid;
    2.34 -
    2.35 -    /* GPFN of the current mapping of the page. */
    2.36 -    xen_pfn_t     gpfn;
    2.37 -};
    2.38 -typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;
    2.39 -DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);
    2.40 -
    2.41 -/*
    2.42 - * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
    2.43 - * code on failure. This call only works for auto-translated guests.
    2.44 - */
    2.45 -#define XENMEM_translate_gpfn_list  8
    2.46 -struct xen_translate_gpfn_list {
    2.47 -    /* Which domain to translate for? */
    2.48 -    domid_t domid;
    2.49 -
    2.50 -    /* Length of list. */
    2.51 -    xen_ulong_t nr_gpfns;
    2.52 -
    2.53 -    /* List of GPFNs to translate. */
    2.54 -    XEN_GUEST_HANDLE(xen_pfn_t) gpfn_list;
    2.55 -
    2.56 -    /*
    2.57 -     * Output list to contain MFN translations. May be the same as the input
    2.58 -     * list (in which case each input GPFN is overwritten with the output MFN).
    2.59 -     */
    2.60 -    XEN_GUEST_HANDLE(xen_pfn_t) mfn_list;
    2.61 -};
    2.62 -typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t;
    2.63 -DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t);
    2.64 +/*** REMOVED ***/
    2.65 +/*#define XENMEM_translate_gpfn_list  8*/
    2.66  
    2.67  /*
    2.68   * Returns the pseudo-physical memory map as it was when the domain
    2.69 @@ -299,6 +264,19 @@ struct xen_foreign_memory_map {
    2.70  typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
    2.71  DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
    2.72  
    2.73 +#define XENMEM_set_pod_target       16
    2.74 +#define XENMEM_get_pod_target       17
    2.75 +struct xen_pod_target {
    2.76 +    /* IN */
    2.77 +    uint64_t target_pages;
    2.78 +    /* OUT */
    2.79 +    uint64_t tot_pages;
    2.80 +    uint64_t pod_cache_pages;
    2.81 +    uint64_t pod_entries;
    2.82 +    /* IN */
    2.83 +    domid_t domid;
    2.84 +};
    2.85 +typedef struct xen_pod_target xen_pod_target_t;
    2.86  #endif /* __XEN_PUBLIC_MEMORY_H__ */
    2.87  
    2.88  /*