From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v5 6/8] libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc Date: Fri, 20 Mar 2015 14:30:29 +0000 Message-ID: <1426861829.21742.203.camel@citrix.com> References: <1426802044-19444-1-git-send-email-boris.ostrovsky@oracle.com> <1426802044-19444-7-git-send-email-boris.ostrovsky@oracle.com> <1426859677.21742.192.camel@citrix.com> <550C2DA2.3040309@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <550C2DA2.3040309@oracle.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: Boris Ostrovsky Cc: elena.ufimtseva@oracle.com, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, jbeulich@suse.com, keir@xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2015-03-20 at 10:24 -0400, Boris Ostrovsky wrote: > On 03/20/2015 09:54 AM, Ian Campbell wrote: > > On Thu, 2015-03-19 at 17:54 -0400, Boris Ostrovsky wrote: > >> + if (cputopo) { > >> + if ((ret = xc_hypercall_bounce_pre(xch, cputopo))) > > I think this guy will tolerate a NULL here (and on post), so I > > think/hope you can get away without this conditional stuff. Can you give > > it a go please. > > I'll see if this works. (I can't mentally unwrap all these macros, I'll > need to test it. Or at least run it through pre-processor) The important function is xc__hypercall_bounce_pre which handles b->ubuf==NULL. Ian.