From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v17 01/10] x86: add generic resource (e.g. MSR) access hypercall Date: Mon, 29 Sep 2014 14:55:35 +0100 Message-ID: <542980F7020000780003A8EE@mail.emea.novell.com> References: <1411987239-3509-1-git-send-email-chao.p.peng@linux.intel.com> <1411987239-3509-2-git-send-email-chao.p.peng@linux.intel.com> <542962E2.9070902@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <542962E2.9070902@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Chao Peng , xen-devel@lists.xen.org Cc: keir@xen.org, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com, Ian.Jackson@eu.citrix.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 29.09.14 at 15:47, 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