aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/compat
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2007-05-30 11:55:38 +0100
committerIan Campbell <ian.campbell@xensource.com>2007-05-30 11:55:38 +0100
commitca938d8cc6d30f0c99e631e6fb050ce1c921ab08 (patch)
tree9d56aebbd52486d1042ef8d64c28ab3e5749b071 /xen/common/compat
parent96469475a6848763fd542d1305660ee7a8561569 (diff)
downloadxen-ca938d8cc6d30f0c99e631e6fb050ce1c921ab08.tar.gz
xen-ca938d8cc6d30f0c99e631e6fb050ce1c921ab08.tar.bz2
xen-ca938d8cc6d30f0c99e631e6fb050ce1c921ab08.zip
Fix preemption of multicalls in compat mode.
mcs->call (struct multicall_entry) always needs to be translated into mcs->compat_call (struct compat_multicall_entry) when a multicall is preempted in compat mode. Previously this translation only occured for those hypercalls which explicitly called hypercall_xlat_continuation() which doesn't cover all hypercalls which could potentially be preempted. Change hypercall_xlat_continuation() to only translate only the hypercall arguments themselves and not the multicall_entry layout. Translate the layout for all hypercalls in in compat_multicall() instead. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Diffstat (limited to 'xen/common/compat')
-rw-r--r--xen/common/compat/multicall.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/common/compat/multicall.c b/xen/common/compat/multicall.c
index 17b12d6462..0eb1212772 100644
--- a/xen/common/compat/multicall.c
+++ b/xen/common/compat/multicall.c
@@ -10,6 +10,13 @@
typedef int ret_t;
#undef do_multicall_call
+static inline void xlat_multicall_entry(struct mc_state *mcs)
+{
+ int i;
+ for (i=0; i<6; i++)
+ mcs->compat_call.args[i] = mcs->call.args[i];
+}
+
DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_t);
#define multicall_entry compat_multicall_entry
#define multicall_entry_t multicall_entry_compat_t