From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH Remus v2 04/10] tools/libxc: introduce DECLARE_HYPERCALL_BUFFER_USER_POINTER Date: Fri, 8 May 2015 11:16:00 +0100 Message-ID: <554C8CE0.4070108@citrix.com> References: <1431077610-3366-1-git-send-email-yanghy@cn.fujitsu.com> <1431077610-3366-5-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431077610-3366-5-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang , xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, wency@cn.fujitsu.com, ian.jackson@eu.citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On 08/05/15 10:33, Yang Hongyang wrote: > Define a user pointer that can access the hypercall buffer data > Useful when you only need to access the hypercall buffer data > > Signed-off-by: Yang Hongyang > --- > tools/libxc/include/xenctrl.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h > index 6994c51..12e8c36 100644 > --- a/tools/libxc/include/xenctrl.h > +++ b/tools/libxc/include/xenctrl.h > @@ -296,6 +296,14 @@ typedef struct xc_hypercall_buffer xc_hypercall_buffer_t; > } > > /* > + * Define a user pointer that can access the hypercall buffer data > + * > + * Useful when you only need to access the hypercall buffer data > + */ > +#define DECLARE_HYPERCALL_BUFFER_USER_POINTER(_type, _name, _hbuf) \ > + _type *_name = _hbuf->hbuf; There are some bracketing issues here. Please refer to my fixup patch which I will post as soon as I can. ~Andrew > + > +/* > * Declare the necessary data structure to allow a hypercall buffer > * passed as an argument to a function to be used in the normal way. > */