From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Guyader Subject: [PATCH 3/5] xen: Enforce introduce guest_handle_for_field Date: Thu, 28 Jun 2012 17:26:24 +0100 Message-ID: <1340900786-21802-4-git-send-email-jean.guyader@citrix.com> References: <1340900786-21802-1-git-send-email-jean.guyader@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------true" Return-path: In-Reply-To: <1340900786-21802-1-git-send-email-jean.guyader@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: xen-devel@lists.xen.org Cc: Jean Guyader List-Id: xen-devel@lists.xenproject.org --------------true Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable This helper turns a field of a GUEST_HANDLE in a GUEST_HANDLE. Signed-off-by: Jean Guyader --- xen/include/asm-x86/guest_access.h | 3 +++ 1 file changed, 3 insertions(+) --------------true Content-Type: text/x-patch; name="0003-xen-Enforce-introduce-guest_handle_for_field.patch" Content-Disposition: attachment; filename="0003-xen-Enforce-introduce-guest_handle_for_field.patch" Content-Transfer-Encoding: quoted-printable diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/asm-x86/gue= st_access.h index 2b429c2..e3ac1d6 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 }; \ }) =20 +#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) \ --------------true Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------true--