Skip to content

Commit 95bc438

Browse files
dozylynxandyhhp
authored andcommitted
xen/arm: introduce guest_handle_for_field()
ARM port of c/s bb54458: "introduce guest_handle_for_field()" This helper turns a field of a GUEST_HANDLE into a GUEST_HANDLE. Signed-off-by: Christopher Clark <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Reviewed-by: Stefano Stabellini <[email protected]> === v3: Added Stefano's Reviewed-by v2: Added Paul's Reviewed-by
1 parent 9d56cbf commit 95bc438

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

xen/include/asm-arm/guest_access.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ int access_guest_memory_by_ipa(struct domain *d, paddr_t ipa, void *buf,
6363
_y; \
6464
})
6565

66+
#define guest_handle_for_field(hnd, type, fld) \
67+
((XEN_GUEST_HANDLE(type)) { &(hnd).p->fld })
68+
6669
#define guest_handle_from_ptr(ptr, type) \
6770
((XEN_GUEST_HANDLE_PARAM(type)) { (type *)ptr })
6871
#define const_guest_handle_from_ptr(ptr, type) \

0 commit comments

Comments
 (0)