WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] x86: use compat hypercall handlers for

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: use compat hypercall handlers for calls from 32-bit HVM guests
From: Xen patchbot-4.0-testing <patchbot@xxxxxxx>
Date: Thu, 12 May 2011 18:50:56 +0100
Delivery-date: Thu, 12 May 2011 10:51:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1305188601 -3600
# Node ID f47c6786ea6d8f14ce0a6770e9be51ca2b9d6888
# Parent  c6f9bd19cec835794c9ece40342ea8e9841fc512
x86: use compat hypercall handlers for calls from 32-bit HVM guests

On 64-bit Xen, hypercalls from 32-bit HVM guests are handled as
a special case, but not all the hypercalls are corrently redirected
to their compat-mode wrappers.  Use compat_* for xen_version,
sched_op and set_timer_op for consistency.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset:   23333:fabdd682420c
xen-unstable date:        Thu May 12 09:13:18 2011 +0100
---


diff -r c6f9bd19cec8 -r f47c6786ea6d xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu May 12 09:21:30 2011 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Thu May 12 09:23:21 2011 +0100
@@ -2304,14 +2304,17 @@
     HYPERCALL(tmem_op)
 };
 
+#define COMPAT_CALL(x)                                        \
+    [ __HYPERVISOR_ ## x ] = (hvm_hypercall_t *) compat_ ## x
+
 static hvm_hypercall_t *hvm_hypercall32_table[NR_hypercalls] = {
     [ __HYPERVISOR_memory_op ] = (hvm_hypercall_t *)hvm_memory_op_compat32,
     [ __HYPERVISOR_grant_table_op ] = (hvm_hypercall_t 
*)hvm_grant_table_op_compat32,
     [ __HYPERVISOR_vcpu_op ] = (hvm_hypercall_t *)hvm_vcpu_op_compat32,
-    HYPERCALL(xen_version),
+    COMPAT_CALL(xen_version),
     HYPERCALL(event_channel_op),
-    HYPERCALL(sched_op),
-    HYPERCALL(set_timer_op),
+    COMPAT_CALL(sched_op),
+    COMPAT_CALL(set_timer_op),
     HYPERCALL(hvm_op),
     HYPERCALL(tmem_op)
 };
diff -r c6f9bd19cec8 -r f47c6786ea6d xen/include/xen/hypercall.h
--- a/xen/include/xen/hypercall.h       Thu May 12 09:21:30 2011 +0100
+++ b/xen/include/xen/hypercall.h       Thu May 12 09:23:21 2011 +0100
@@ -146,6 +146,20 @@
 extern int
 compat_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
 
+extern int
+compat_xen_version(
+    int cmd,
+    XEN_GUEST_HANDLE(void) arg);
+
+extern int
+compat_sched_op(
+    int cmd,
+    XEN_GUEST_HANDLE(void) arg);
+
+extern int
+compat_set_timer_op(
+    s_time_t timeout);
+
 #endif
 
 #endif /* __XEN_HYPERCALL_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86: use compat hypercall handlers for calls from 32-bit HVM guests, Xen patchbot-4 . 0-testing <=