[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] interfaces: Remove explicit alignment/padding from domctl/sysctl hypercalls.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 96a4379be74a579b04f19c91895c92a45936daed # Parent fd6c2b5e041f8477b11ee89d6d2df87639bf2794 [XEN] interfaces: Remove explicit alignment/padding from domctl/sysctl hypercalls. Generation of 32-on-64 compat shims is being semi-automated for all other hypercalls. It seems sensible to teat all hypercalls uniformly and do the same for the control-stack management interfaces too. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/include/public/arch-ia64.h | 3 --- xen/include/public/arch-powerpc.h | 3 --- xen/include/public/arch-x86_32.h | 17 ++--------------- xen/include/public/arch-x86_64.h | 3 --- xen/include/public/domctl.h | 18 +++++++----------- xen/include/public/sysctl.h | 16 ++++++---------- 6 files changed, 15 insertions(+), 45 deletions(-) diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/arch-ia64.h Thu Aug 31 19:53:27 2006 +0100 @@ -18,15 +18,12 @@ #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name -#define XEN_GUEST_HANDLE_64(name) __guest_handle_ ## name #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) #ifdef __XEN_TOOLS__ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) #endif #ifndef __ASSEMBLY__ -typedef uint64_t uint64_aligned_t; - /* Guest handles for primitive C types. */ __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/arch-powerpc.h --- a/xen/include/public/arch-powerpc.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/arch-powerpc.h Thu Aug 31 19:53:27 2006 +0100 @@ -29,7 +29,6 @@ #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name -#define XEN_GUEST_HANDLE_64(name) __guest_handle_ ## name #define set_xen_guest_handle(hnd, val) \ do { \ if (sizeof ((hnd).__pad)) \ @@ -42,8 +41,6 @@ #endif #ifndef __ASSEMBLY__ -typedef uint64_t uint64_aligned_t; - /* Guest handles for primitive C types. */ __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/arch-x86_32.h --- a/xen/include/public/arch-x86_32.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/arch-x86_32.h Thu Aug 31 19:53:27 2006 +0100 @@ -28,14 +28,7 @@ #endif /* Structural guest handles introduced in 0x00030201. */ -#if (defined(__XEN__) || defined(__XEN_TOOLS__)) && !defined(__ASSEMBLY__) -typedef uint64_t __attribute__((aligned(8))) uint64_aligned_t; -#define __DEFINE_XEN_GUEST_HANDLE(name, type) \ - typedef struct { type *p; } \ - __guest_handle_ ## name; \ - typedef struct { union { type *p; uint64_aligned_t q; }; } \ - __guest_handle_64_ ## name -#elif __XEN_INTERFACE_VERSION__ >= 0x00030201 +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \ typedef struct { type *p; } __guest_handle_ ## name #else @@ -45,15 +38,9 @@ typedef uint64_t __attribute__((aligned( #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name -#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name +#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) #ifdef __XEN_TOOLS__ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) -#define set_xen_guest_handle(hnd, val) \ - do { if ( sizeof(hnd) == 8 ) *(uint64_t *)&(hnd) = 0; \ - (hnd).p = val; \ - } while ( 0 ) -#else -#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) #endif #ifndef __ASSEMBLY__ diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/arch-x86_64.h --- a/xen/include/public/arch-x86_64.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/arch-x86_64.h Thu Aug 31 19:53:27 2006 +0100 @@ -39,15 +39,12 @@ #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name -#define XEN_GUEST_HANDLE_64(name) __guest_handle_ ## name #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) #ifdef __XEN_TOOLS__ #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) #endif #ifndef __ASSEMBLY__ -typedef uint64_t uint64_aligned_t; - /* Guest handles for primitive C types. */ __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/domctl.h --- a/xen/include/public/domctl.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/domctl.h Thu Aug 31 19:53:27 2006 +0100 @@ -16,12 +16,10 @@ #include "xen.h" -#define XEN_DOMCTL_INTERFACE_VERSION 0x00000002 - -#define uint64_t uint64_aligned_t +#define XEN_DOMCTL_INTERFACE_VERSION 0x00000003 struct xenctl_cpumap { - XEN_GUEST_HANDLE_64(uint8_t) bitmap; + XEN_GUEST_HANDLE(uint8_t) bitmap; uint32_t nr_cpus; }; @@ -76,7 +74,7 @@ struct xen_domctl_getmemlist { uint64_t max_pfns; /* Start index in guest's page list. */ uint64_t start_pfn; - XEN_GUEST_HANDLE_64(xen_pfn_t) buffer; + XEN_GUEST_HANDLE(xen_pfn_t) buffer; /* OUT variables. */ uint64_t num_pfns; }; @@ -113,7 +111,7 @@ struct xen_domctl_getpageframeinfo2 { /* IN variables. */ uint64_t num; /* IN/OUT variables. */ - XEN_GUEST_HANDLE_64(ulong) array; + XEN_GUEST_HANDLE(ulong) array; }; typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t); @@ -187,7 +185,7 @@ struct xen_domctl_shadow_op { uint32_t mb; /* Shadow memory allocation in MB */ /* OP_PEEK / OP_CLEAN */ - XEN_GUEST_HANDLE_64(ulong) dirty_bitmap; + XEN_GUEST_HANDLE(ulong) dirty_bitmap; uint64_t pages; /* Size of buffer. Updated with actual size. */ struct xen_domctl_shadow_op_stats stats; }; @@ -207,8 +205,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_m #define XEN_DOMCTL_setvcpucontext 12 #define XEN_DOMCTL_getvcpucontext 13 struct xen_domctl_vcpucontext { - uint32_t vcpu; /* IN */ - XEN_GUEST_HANDLE_64(vcpu_guest_context_t) ctxt; /* IN/OUT */ + uint32_t vcpu; /* IN */ + XEN_GUEST_HANDLE(vcpu_guest_context_t) ctxt; /* IN/OUT */ }; typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t); @@ -381,8 +379,6 @@ typedef struct xen_domctl xen_domctl_t; typedef struct xen_domctl xen_domctl_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_t); -#undef uint64_t - #endif /* __XEN_PUBLIC_DOMCTL_H__ */ /* diff -r fd6c2b5e041f -r 96a4379be74a xen/include/public/sysctl.h --- a/xen/include/public/sysctl.h Thu Aug 31 18:54:50 2006 +0100 +++ b/xen/include/public/sysctl.h Thu Aug 31 19:53:27 2006 +0100 @@ -16,9 +16,7 @@ #include "xen.h" #include "domctl.h" -#define XEN_SYSCTL_INTERFACE_VERSION 0x00000001 - -#define uint64_t uint64_aligned_t +#define XEN_SYSCTL_INTERFACE_VERSION 0x00000002 /* * Read console content from Xen buffer ring. @@ -26,8 +24,8 @@ #define XEN_SYSCTL_readconsole 1 struct xen_sysctl_readconsole { /* IN variables. */ - uint32_t clear; /* Non-zero -> clear after reading. */ - XEN_GUEST_HANDLE_64(char) buffer; /* Buffer start */ + uint32_t clear; /* Non-zero -> clear after reading. */ + XEN_GUEST_HANDLE(char) buffer; /* Buffer start */ /* IN/OUT variables. */ uint32_t count; /* In: Buffer size; Out: Used buffer size */ }; @@ -105,9 +103,9 @@ struct xen_sysctl_perfc_op { uint32_t nr_counters; /* number of counters description */ uint32_t nr_vals; /* number of values */ /* counter information (or NULL) */ - XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc; + XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc; /* counter values (or NULL) */ - XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val; + XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val; }; typedef struct xen_sysctl_perfc_op xen_sysctl_perfc_op_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_perfc_op_t); @@ -117,7 +115,7 @@ struct xen_sysctl_getdomaininfolist { /* IN variables. */ domid_t first_domain; uint32_t max_domains; - XEN_GUEST_HANDLE_64(xen_domctl_getdomaininfo_t) buffer; + XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t) buffer; /* OUT variables. */ uint32_t num_domains; }; @@ -140,8 +138,6 @@ typedef struct xen_sysctl xen_sysctl_t; typedef struct xen_sysctl xen_sysctl_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_t); -#undef uint64_t - #endif /* __XEN_PUBLIC_SYSCTL_H__ */ /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |