[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 10/25] arm: introduce guest_handle_for_field()



> -----Original Message-----
> From: Christopher Clark [mailto:christopher.w.clark@xxxxxxxxx]
> Sent: 01 December 2018 01:33
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>; Julien Grall
> <julien.grall@xxxxxxx>; Paul Durrant <Paul.Durrant@xxxxxxxxxx>; Rich
> Persaud <persaur@xxxxxxxxx>; Ross Philipson <ross.philipson@xxxxxxxxx>;
> Eric Chanudet <eric.chanudet@xxxxxxxxx>; James McKenzie
> <voreekf@xxxxxxxxxxxxx>; Jason Andryuk <jandryuk@xxxxxxxxx>; Daniel Smith
> <dpsmith@xxxxxxxxxxxxxxxxxxxx>
> Subject: [PATCH 10/25] arm: introduce guest_handle_for_field()
> 
> arm port of commit bb544585137259545d4adc9afe6eed8dc7c7376d

Capitalize 'arm'? Also maybe shorten the quoted hash, and you should include 
the commit title here.

> 
> This helper turns a field of a GUEST_HANDLE into a GUEST_HANDLE.
> 
> Signed-off-by: Christopher Clark <christopher.clark6@xxxxxxxxxxxxxx>

The code looks fine, so with a revised comment...

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  xen/include/asm-arm/guest_access.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/include/asm-arm/guest_access.h b/xen/include/asm-
> arm/guest_access.h
> index 7b6f89c..1137c54 100644
> --- a/xen/include/asm-arm/guest_access.h
> +++ b/xen/include/asm-arm/guest_access.h
> @@ -68,6 +68,9 @@ int access_guest_memory_by_ipa(struct domain *d, paddr_t
> ipa, void *buf,
>      _y;                                                     \
>  })
> 
> +#define guest_handle_for_field(hnd, type, fld)          \
> +    ((XEN_GUEST_HANDLE(type)) { &(hnd).p->fld })
> +
>  #define guest_handle_from_ptr(ptr, type)        \
>      ((XEN_GUEST_HANDLE_PARAM(type)) { (type *)ptr })
>  #define const_guest_handle_from_ptr(ptr, type)  \
> --
> 2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.