aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/compat.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-13 16:10:50 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-13 16:10:50 +0100
commit7ea5efa1368151f096094ea18df6b710216e3afa (patch)
treedd2a27090ed13bc4f966bc90b5eeb4f7f3bf34ae /xen/include/xen/compat.h
parent665d7a5c3db5b777168e92ede4c12eb4edb86dbb (diff)
downloadxen-7ea5efa1368151f096094ea18df6b710216e3afa.tar.gz
xen-7ea5efa1368151f096094ea18df6b710216e3afa.tar.bz2
xen-7ea5efa1368151f096094ea18df6b710216e3afa.zip
32-on-64: Fix compat-access macros to use correct underlying HVM accessors.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/xen/compat.h')
-rw-r--r--xen/include/xen/compat.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h
index 205f843667..a2a4d6c2dd 100644
--- a/xen/include/xen/compat.h
+++ b/xen/include/xen/compat.h
@@ -47,7 +47,7 @@
const typeof(*(ptr)) *_s = (ptr); \
char (*_d)[sizeof(*_s)] = (void *)(full_ptr_t)(hnd).c; \
((void)((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c == (ptr))); \
- copy_to_user(_d + (off), _s, sizeof(*_s) * (nr)); \
+ raw_copy_to_guest(_d + (off), _s, sizeof(*_s) * (nr)); \
})
/*
@@ -57,7 +57,7 @@
#define copy_from_compat_offset(ptr, hnd, off, nr) ({ \
const typeof(*(ptr)) *_s = (typeof(**(hnd)._) *)(full_ptr_t)(hnd).c; \
typeof(*(ptr)) *_d = (ptr); \
- copy_from_user(_d, _s + (off), sizeof(*_d) * (nr)); \
+ raw_copy_from_guest(_d, _s + (off), sizeof(*_d) * (nr)); \
})
#define copy_to_compat(hnd, ptr, nr) \
@@ -72,7 +72,7 @@
void *_d = &((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field; \
((void)(&((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field == \
&(ptr)->field)); \
- copy_to_user(_d, _s, sizeof(*_s)); \
+ raw_copy_to_guest(_d, _s, sizeof(*_s)); \
})
/* Copy sub-field of a structure from guest context via a compat handle. */
@@ -80,7 +80,7 @@
const typeof(&(ptr)->field) _s = \
&((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field; \
typeof(&(ptr)->field) _d = &(ptr)->field; \
- copy_from_user(_d, _s, sizeof(*_d)); \
+ raw_copy_from_guest(_d, _s, sizeof(*_d)); \
})
/*
@@ -95,13 +95,13 @@
const typeof(*(ptr)) *_s = (ptr); \
char (*_d)[sizeof(*_s)] = (void *)(full_ptr_t)(hnd).c; \
((void)((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c == (ptr))); \
- __copy_to_user(_d + (off), _s, sizeof(*_s) * (nr)); \
+ __raw_copy_to_guest(_d + (off), _s, sizeof(*_s) * (nr)); \
})
#define __copy_from_compat_offset(ptr, hnd, off, nr) ({ \
const typeof(*(ptr)) *_s = (typeof(**(hnd)._) *)(full_ptr_t)(hnd).c; \
typeof(*(ptr)) *_d = (ptr); \
- __copy_from_user(_d, _s + (off), sizeof(*_d) * (nr)); \
+ __raw_copy_from_guest(_d, _s + (off), sizeof(*_d) * (nr)); \
})
#define __copy_to_compat(hnd, ptr, nr) \
@@ -115,14 +115,14 @@
void *_d = &((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field; \
((void)(&((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field == \
&(ptr)->field)); \
- __copy_to_user(_d, _s, sizeof(*_s)); \
+ __raw_copy_to_guest(_d, _s, sizeof(*_s)); \
})
#define __copy_field_from_compat(ptr, hnd, field) ({ \
const typeof(&(ptr)->field) _s = \
&((typeof(**(hnd)._) *)(full_ptr_t)(hnd).c)->field; \
typeof(&(ptr)->field) _d = &(ptr)->field; \
- __copy_from_user(_d, _s, sizeof(*_d)); \
+ __raw_copy_from_guest(_d, _s, sizeof(*_d)); \
})