ia64/xen-unstable

changeset 16225:5eb7729fcca0

xen: Fix new domctl/sysctl structs to be 32-/64-bit invariant.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Thu Oct 25 11:38:04 2007 +0100 (2007-10-25)
parents f63aba1b5387
children e5a0ed682280
files xen/include/public/domctl.h xen/include/public/sysctl.h
line diff
     1.1 --- a/xen/include/public/domctl.h	Thu Oct 25 09:44:11 2007 +0100
     1.2 +++ b/xen/include/public/domctl.h	Thu Oct 25 11:38:04 2007 +0100
     1.3 @@ -474,11 +474,11 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_
     1.4  /* Bind machine I/O address range -> HVM address range. */
     1.5  #define XEN_DOMCTL_memory_mapping    39
     1.6  struct xen_domctl_memory_mapping {
     1.7 -    uint64_t first_gfn;       /* first page (hvm guest phys page) in range */
     1.8 -    uint64_t first_mfn;       /* first page (machine page) in range */
     1.9 -    uint64_t nr_mfns;         /* number of pages in range (>0) */
    1.10 -    uint32_t add_mapping;     /* add or remove mapping */
    1.11 -    uint32_t padding;         /* padding for 64-bit aligned structure */
    1.12 +    uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */
    1.13 +    uint64_aligned_t first_mfn; /* first page (machine page) in range */
    1.14 +    uint64_aligned_t nr_mfns;   /* number of pages in range (>0) */
    1.15 +    uint32_t add_mapping;       /* add or remove mapping */
    1.16 +    uint32_t padding;           /* padding for 64-bit aligned structure */
    1.17  };
    1.18  typedef struct xen_domctl_memory_mapping xen_domctl_memory_mapping_t;
    1.19  DEFINE_XEN_GUEST_HANDLE(xen_domctl_memory_mapping_t);
    1.20 @@ -495,6 +495,7 @@ struct xen_domctl_ioport_mapping {
    1.21  typedef struct xen_domctl_ioport_mapping xen_domctl_ioport_mapping_t;
    1.22  DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
    1.23  
    1.24 +
    1.25  /*
    1.26   * Pin caching type of RAM space for x86 HVM domU.
    1.27   */
    1.28 @@ -507,12 +508,13 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_iopor
    1.29  #define XEN_DOMCTL_MEM_CACHEATTR_WB  6
    1.30  #define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
    1.31  struct xen_domctl_pin_mem_cacheattr {
    1.32 -    uint64_t start, end;
    1.33 +    uint64_aligned_t start, end;
    1.34      unsigned int type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
    1.35  };
    1.36  typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t;
    1.37  DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t);
    1.38  
    1.39 +
    1.40  struct xen_domctl {
    1.41      uint32_t cmd;
    1.42      uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
     2.1 --- a/xen/include/public/sysctl.h	Thu Oct 25 09:44:11 2007 +0100
     2.2 +++ b/xen/include/public/sysctl.h	Thu Oct 25 11:38:04 2007 +0100
     2.3 @@ -171,7 +171,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_debug
     2.4  /* Get physical CPU information. */
     2.5  #define XEN_SYSCTL_getcpuinfo        8
     2.6  struct xen_sysctl_cpuinfo {
     2.7 -    uint64_t idletime;
     2.8 +    uint64_aligned_t idletime;
     2.9  };
    2.10  typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t;
    2.11  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t); 
    2.12 @@ -192,7 +192,7 @@ struct xen_sysctl_availheap {
    2.13      uint32_t max_bitwidth;  /* Largest address width (zero if don't care). */
    2.14      int32_t  node;          /* NUMA node of interest (-1 for all nodes). */
    2.15      /* OUT variables. */
    2.16 -    uint64_t avail_bytes;   /* Bytes available in the specified region. */
    2.17 +    uint64_aligned_t avail_bytes;/* Bytes available in the specified region. */
    2.18  };
    2.19  typedef struct xen_sysctl_availheap xen_sysctl_availheap_t;
    2.20  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_availheap_t);