projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2f664a
)
introduce guest_handle_for_field()
author
Jan Beulich
<jbeulich@suse.com>
Thu, 20 Sep 2012 11:31:19 +0000
(13:31 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Thu, 20 Sep 2012 11:31:19 +0000
(13:31 +0200)
This helper turns a field of a GUEST_HANDLE in a GUEST_HANDLE.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/guest_access.h
patch
|
blob
|
history
diff --git
a/xen/include/asm-x86/guest_access.h
b/xen/include/asm-x86/guest_access.h
index 2b429c225f1e3adf828486675e1b645c234c1ec3..e3ac1d6fa8f66c10c190f9a7ce99f8f3f25a71e6 100644
(file)
--- 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) \