From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v2 3/4] libxc/tbuf: Use the xc_hypercall_bounce_[pre|post] instead of memcpy Date: Wed, 18 Jun 2014 09:59:56 -0400 Message-ID: <20140618135956.GA4651@laptop.dumpdata.com> References: <1402692084-931-1-git-send-email-konrad.wilk@oracle.com> <1402692084-931-4-git-send-email-konrad.wilk@oracle.com> <1403099705.6568.26.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1403099705.6568.26.camel@kazak.uk.xensource.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: Ian Campbell Cc: george.dunlap@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Jun 18, 2014 at 02:55:05PM +0100, Ian Campbell wrote: > On Fri, 2014-06-13 at 16:41 -0400, Konrad Rzeszutek Wilk wrote: > > for bounce buffer of the xc_cpumask_t. > > You just added this stuff in the previous patch. Why not fold? I was thinking it might be a bit too busy. But I will be more than happy to fold it in. > > > Signed-off-by: Konrad Rzeszutek Wilk > > --- > > tools/libxc/xc_tbuf.c | 13 ++++++------- > > 1 files changed, 6 insertions(+), 7 deletions(-) > > > > diff --git a/tools/libxc/xc_tbuf.c b/tools/libxc/xc_tbuf.c > > index 2828aee..85156dd 100644 > > --- a/tools/libxc/xc_tbuf.c > > +++ b/tools/libxc/xc_tbuf.c > > @@ -116,7 +116,7 @@ int xc_tbuf_disable(xc_interface *xch) > > int xc_tbuf_set_cpu_mask(xc_interface *xch, xc_cpumap_t mask, int bits) > > { > > DECLARE_SYSCTL; > > - DECLARE_HYPERCALL_BUFFER(uint8_t, bytemap); > > + DECLARE_HYPERCALL_BOUNCE(mask, 0, XC_HYPERCALL_BUFFER_BOUNCE_IN); > > s/0/DIV_ROUND_UP(bits, 8)/ works here and avoids the need for > HYPERCALL_BOUNCE_SET_SIZE (I think). > > The SET_SIZE macro is only generally used when you don't know the size > at declaration time (i.e. because you need to query it first). > > Ian. >