|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v12 for-xen-4.5 01/20] common/symbols: Export hypervisor symbols to privileged guest
> diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
> index 053b9fa..4f21b17 100644
> --- a/xen/include/public/platform.h
> +++ b/xen/include/public/platform.h
> @@ -527,6 +527,24 @@ struct xenpf_core_parking {
> typedef struct xenpf_core_parking xenpf_core_parking_t;
> DEFINE_XEN_GUEST_HANDLE(xenpf_core_parking_t);
>
> +#define XENPF_get_symbol 61
> +struct xenpf_symdata {
> + /* IN/OUT variables */
> + uint32_t namelen; /* IN: size of name buffer */
> + /* OUT: strlen(name) of hypervisor symbol (may be */
> + /* larger than what's been copied to guest) */
> + uint32_t symnum; /* IN: Symbol to read */
> + /* OUT: Next available symbol. If same as IN then */
> + /* we reached the end */
> +
> + /* OUT variables */
> + char type;
> + XEN_GUEST_HANDLE(char) name;
> + uint64_t address;
> +};
> +typedef struct xenpf_symdata xenpf_symdata_t;
This is what 'pahole' says:
struct xenpf_symdata {
uint32_t namelen; /* 0 4 */
uint32_t symnum; /* 4 4 */
char type; /* 8 1 */
/* XXX 7 bytes hole, try to pack */
__guest_handle_char name; /* 16 8 */
uint64_t address; /* 24 8 */
/* size: 32, cachelines: 1, members: 5 */
/* sum members: 25, holes: 1, sum holes: 7 */
/* last cacheline: 32 bytes */
};
If I move them just a bit:
diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
index 4f21b17..b97e476 100644
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -538,9 +538,9 @@ struct xenpf_symdata {
/* we reached the end */
/* OUT variables */
- char type;
- XEN_GUEST_HANDLE(char) name;
uint64_t address;
+ XEN_GUEST_HANDLE(char) name;
+ char type;
};
typedef struct xenpf_symdata xenpf_symdata_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_symdata_t);
'pahole' is satisfied:
struct xenpf_symdata {
uint32_t namelen; /* 0 4 */
uint32_t symnum; /* 4 4 */
uint64_t address; /* 8 8 */
__guest_handle_char name; /* 16 8 */
char type; /* 24 1 */
/* size: 32, cachelines: 1, members: 5 */
/* padding: 7 */
/* last cacheline: 32 bytes */
};
With that change, Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |