From: Ian Campbell Subject: Re: [PATCH 19/21] xen: introduce XEN_GUEST_HANDLE_PARAM Date: Fri, 5 Oct 2012 12:09:45 +0100 Message-ID: <1349435385.20946.53.camel@zakaz.uk.xensource.com> References: <1349433418.20946.46.camel@zakaz.uk.xensource.com> <1349433507-21148-19-git-send-email-ian.campbell@citrix.com> <506EDB33020000780009FE6C@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <506EDB33020000780009FE6C@nat28.tlf.novell.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: Jan Beulich Cc: "Keir (Xen.org)" , "Tim (Xen.org)" , Stefano Stabellini , "xen-devel@lists.xen.org" , "stefano.stabelini@citrix.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-10-05 at 12:05 +0100, Jan Beulich wrote: > >>> On 05.10.12 at 12:38, Ian Campbell wrote: > > From: Stefano Stabellini > > > > XEN_GUEST_HANDLE_PARAM is going to be used to distinguish guest pointers > > stored in memory from guest pointers as hypercall parameters. > > > > guest_handle_* macros default to XEN_GUEST_HANDLE_PARAM as return type. > > Two new guest_handle_to_param and guest_handle_from_param macros are > > introduced to do conversions. > > > > Changes in v2: > > > > - add 2 missing #define _XEN_GUEST_HANDLE_PARAM for the compilation of > > the compat code. > > > > Changes in v3: > > > > - move the guest_handle_cast change into this patch; > > - add a clear comment on top of guest_handle_cast; > > - also s/XEN_GUEST_HANDLE/XEN_GUEST_HANDLE_PARAM in > > guest_handle_from_ptr and const_guest_handle_from_ptr; > > - introduce guest_handle_from_param and guest_handle_to_param. > > I may have asked this before, but don't recall the answer: Is there > really a use case for conversions in both directions? I would think > that only the "to" version is really useful... I can see uses of both in the patched tree. e.g. the from case is used in handle_iomem_range on x86. Ian.