[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v17 01/10] x86: add generic resource (e.g. MSR) access hypercall



>>> On 29.09.14 at 15:47, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 29/09/14 11:40, Chao Peng wrote:
>> --- a/xen/include/public/platform.h
>> +++ b/xen/include/public/platform.h
>> @@ -528,6 +528,33 @@ typedef struct xenpf_core_parking xenpf_core_parking_t;
>>  DEFINE_XEN_GUEST_HANDLE(xenpf_core_parking_t);
>>  
>>  /*
>> + * Access generic platform resources(e.g., accessing MSR, port I/O, etc)
>> + * in unified way. Batch resource operations in one call are supported and
>> + * thay are always non-preemptible and execute in their original order.
>> + */
>> +#define XENPF_resource_op   61
>> +
>> +#define XEN_RESOURCE_OP_MSR_READ  0
>> +#define XEN_RESOURCE_OP_MSR_WRITE 1
>> +
>> +struct xenpf_resource_entry {
>> +    uint32_t cmd;       /* IN: XEN_RESOURCE_OP_* */
>> +    uint32_t rsvd;      /* IN: padding and must be zero */
> 
> This rsvd should be int32_t ret, and an out parameter.

I guess I'd prefer keeping the reserved field as is and
overloading the cmd field (i.e. making it a union). That way
we retain extensibility for something future use of which is
really rather vague at this point.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.