[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v15 02/11] x86: add generic resource (e.g. MSR) access hypercall
>>> On 05.09.14 at 12:59, <andrew.cooper3@xxxxxxxxxx> wrote: > On 05/09/14 09:37, Chao Peng wrote: >> --- a/xen/include/public/platform.h >> +++ b/xen/include/public/platform.h >> @@ -527,6 +527,20 @@ struct xenpf_core_parking { >> typedef struct xenpf_core_parking xenpf_core_parking_t; >> DEFINE_XEN_GUEST_HANDLE(xenpf_core_parking_t); >> >> +#define XENPF_resource_op 61 >> + >> +#define XEN_RESOURCE_OP_MSR_READ 0 >> +#define XEN_RESOURCE_OP_MSR_WRITE 1 >> + >> +struct xenpf_resource_op { >> + uint16_t cmd; /* XEN_RESOURCE_OP_* */ > > There is an alignment issue here between 32 and 64bit. Putting an an > explicit unit16_t _resd; field should fix it. In fact there isn't (uint32_t is 4-byte aligned in both cases), but want such padding be spelled out anyway. Even more, to allow using such fields for future extensions, checking that the caller passes zero is pretty desirable (read: I personally wouldn't accept a patch that doesn't). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |