From b74c53f03d4f5bd77cf9389c1c0495e6ff4d4252 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 25 Oct 2007 11:38:58 +0100 Subject: [PATCH] Sync Xen sysctl/domctl headers. Signed-off-by: Keir Fraser --- include/xen/interface/domctl.h | 30 +++++++++++++++++++++++++----- include/xen/interface/sysctl.h | 4 ++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/include/xen/interface/domctl.h b/include/xen/interface/domctl.h index 318b1199..d44e04f4 100644 --- a/include/xen/interface/domctl.h +++ b/include/xen/interface/domctl.h @@ -474,11 +474,11 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_pt_irq_t); /* Bind machine I/O address range -> HVM address range. */ #define XEN_DOMCTL_memory_mapping 39 struct xen_domctl_memory_mapping { - uint64_t first_gfn; /* first page (hvm guest phys page) in range */ - uint64_t first_mfn; /* first page (machine page) in range */ - uint64_t nr_mfns; /* number of pages in range (>0) */ - uint32_t add_mapping; /* add or remove mapping */ - uint32_t padding; /* padding for 64-bit aligned structure */ + uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */ + uint64_aligned_t first_mfn; /* first page (machine page) in range */ + uint64_aligned_t nr_mfns; /* number of pages in range (>0) */ + uint32_t add_mapping; /* add or remove mapping */ + uint32_t padding; /* padding for 64-bit aligned structure */ }; typedef struct xen_domctl_memory_mapping xen_domctl_memory_mapping_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_memory_mapping_t); @@ -496,6 +496,25 @@ typedef struct xen_domctl_ioport_mapping xen_domctl_ioport_mapping_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t); +/* + * Pin caching type of RAM space for x86 HVM domU. + */ +#define XEN_DOMCTL_pin_mem_cacheattr 41 +/* Caching types: these happen to be the same as x86 MTRR/PAT type codes. */ +#define XEN_DOMCTL_MEM_CACHEATTR_UC 0 +#define XEN_DOMCTL_MEM_CACHEATTR_WC 1 +#define XEN_DOMCTL_MEM_CACHEATTR_WT 4 +#define XEN_DOMCTL_MEM_CACHEATTR_WP 5 +#define XEN_DOMCTL_MEM_CACHEATTR_WB 6 +#define XEN_DOMCTL_MEM_CACHEATTR_UCM 7 +struct xen_domctl_pin_mem_cacheattr { + uint64_aligned_t start, end; + unsigned int type; /* XEN_DOMCTL_MEM_CACHEATTR_* */ +}; +typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t; +DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t); + + struct xen_domctl { uint32_t cmd; uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */ @@ -529,6 +548,7 @@ struct xen_domctl { struct xen_domctl_bind_pt_irq bind_pt_irq; struct xen_domctl_memory_mapping memory_mapping; struct xen_domctl_ioport_mapping ioport_mapping; + struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr; uint8_t pad[128]; } u; }; diff --git a/include/xen/interface/sysctl.h b/include/xen/interface/sysctl.h index 5e4ad0b0..0ea67c5b 100644 --- a/include/xen/interface/sysctl.h +++ b/include/xen/interface/sysctl.h @@ -171,7 +171,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_debug_keys_t); /* Get physical CPU information. */ #define XEN_SYSCTL_getcpuinfo 8 struct xen_sysctl_cpuinfo { - uint64_t idletime; + uint64_aligned_t idletime; }; typedef struct xen_sysctl_cpuinfo xen_sysctl_cpuinfo_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_cpuinfo_t); @@ -192,7 +192,7 @@ struct xen_sysctl_availheap { uint32_t max_bitwidth; /* Largest address width (zero if don't care). */ int32_t node; /* NUMA node of interest (-1 for all nodes). */ /* OUT variables. */ - uint64_t avail_bytes; /* Bytes available in the specified region. */ + uint64_aligned_t avail_bytes;/* Bytes available in the specified region. */ }; typedef struct xen_sysctl_availheap xen_sysctl_availheap_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_availheap_t); -- 2.39.5