From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save Date: Tue, 12 May 2015 15:04:36 +0800 Message-ID: <5551A604.4060103@cn.fujitsu.com> References: <1431077610-3366-1-git-send-email-yanghy@cn.fujitsu.com> <1431077610-3366-3-git-send-email-yanghy@cn.fujitsu.com> <554C85A7.5000103@citrix.com> <554C88F7.2030908@cn.fujitsu.com> <554C8B08.6020409@citrix.com> <555003DE.9090104@cn.fujitsu.com> <1431344839.8263.34.camel@citrix.com> <1431344973.8263.35.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431344973.8263.35.camel@citrix.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: wei.liu2@citrix.com, eddie.dong@intel.com, wency@cn.fujitsu.com, Andrew Cooper , yunhong.jiang@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On 05/11/2015 07:49 PM, Ian Campbell wrote: > On Mon, 2015-05-11 at 12:47 +0100, Ian Campbell wrote: >>>>> Actually this is another trick that I need to deal with those >>>>> hypercall macros. >>>>> DECLARE_HYPERCALL_BUFFER_SHADOW will define a user pointer "dirty_bitmap" >>>>> and a shadow buffer, although xc_hypercall_buffer_free_pages takes >>>>> "dirty_bitmap" as an augument, but it is also a MACRO, without >>>>> "if ( dirty_bitmap )", the compiler will report "dirty_bitmap" unused >>>>> error... >>>> >>>> Ah, in which case you would be better using >>>> xc__hypercall_buffer_free_pages() and not creating the local shadow in >>>> the first place. >>> >>> I thought we'd better use those MACROs which described in the comments... >>> If it is OK to use xc__hypercall_buffer_free_pages(), I will fix it in >>> the next version. >> >> If anything I think I'd prefer for the if to move inside the >> xc_hypercall_buffer_free_pages macro. > > Or if you want to use the "raw" xc__hypercall_buffer variant you should > be consistent and do the same on allocation. I think I will add a patch that move the if inside the xc_hypercall_buffer_free_pages macro. > > Ian. > > > . > -- Thanks, Yang.