aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/compat
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-12-10 11:18:25 +0100
committerJan Beulich <jbeulich@suse.com>2012-12-10 11:18:25 +0100
commite93e0d9d73ce77bd1f3471af68a194b47e0e8c45 (patch)
treebe7768d89381228bc3ed5f4867db23f631a78054 /xen/common/compat
parentedaa3f893f8f046e05099bc0d087b276a90451d4 (diff)
downloadxen-e93e0d9d73ce77bd1f3471af68a194b47e0e8c45.tar.gz
xen-e93e0d9d73ce77bd1f3471af68a194b47e0e8c45.tar.bz2
xen-e93e0d9d73ce77bd1f3471af68a194b47e0e8c45.zip
streamline guest copy operations
- use the variants not validating the VA range when writing back structures/fields to the same space that they were previously read from - when only a single field of a structure actually changed, copy back just that field where possible - consolidate copying back results in a few places Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/compat')
-rw-r--r--xen/common/compat/memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 9e0192590d..e0fc20524c 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -292,8 +292,9 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
}
cmp.xchg.nr_exchanged = nat.xchg->nr_exchanged;
- if ( copy_field_to_guest(guest_handle_cast(compat, compat_memory_exchange_t),
- &cmp.xchg, nr_exchanged) )
+ if ( __copy_field_to_guest(guest_handle_cast(compat,
+ compat_memory_exchange_t),
+ &cmp.xchg, nr_exchanged) )
rc = -EFAULT;
if ( rc < 0 )