From: Jan Beulich Date: Thu, 20 Sep 2012 11:31:19 +0000 (+0200) Subject: introduce guest_handle_for_field() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7871 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bb544585137259545d4adc9afe6eed8dc7c7376d;p=xen.git introduce guest_handle_for_field() This helper turns a field of a GUEST_HANDLE in a GUEST_HANDLE. Signed-off-by: Jan Beulich --- diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/asm-x86/guest_access.h index 2b429c225f..e3ac1d6fa8 100644 --- a/xen/include/asm-x86/guest_access.h +++ b/xen/include/asm-x86/guest_access.h @@ -51,6 +51,9 @@ (XEN_GUEST_HANDLE(type)) { _x }; \ }) +#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(type)) { (type *)ptr }) #define const_guest_handle_from_ptr(ptr, type) \