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-unstable] Enable compatibility mode operation for H

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Enable compatibility mode operation for HYPERVISOR_sched_op and
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Jan 2007 12:55:28 -0800
Delivery-date: Fri, 05 Jan 2007 13:49:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
# Date 1168018475 0
# Node ID 883c0080dd05a212260f2f97701cbee60c411600
# Parent  c2a82e026497733a315a46a3a39c69a58850b8bf
Enable compatibility mode operation for HYPERVISOR_sched_op and
HYPERVISOR_set_timer_op.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/x86_64/compat/entry.S |    6 +---
 xen/common/Makefile                |    5 +++
 xen/common/compat/schedule.c       |   51 +++++++++++++++++++++++++++++++++++++
 xen/common/schedule.c              |   19 +++++++++++--
 xen/include/xlat.lst               |    3 ++
 5 files changed, 77 insertions(+), 7 deletions(-)

diff -r c2a82e026497 -r 883c0080dd05 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S        Fri Jan 05 17:34:34 2007 +0000
+++ b/xen/arch/x86/x86_64/compat/entry.S        Fri Jan 05 17:34:35 2007 +0000
@@ -279,10 +279,8 @@ CFIX14:
 .section .rodata, "a", @progbits
 
 #define compat_platform_op domain_crash_synchronous
-#define compat_set_timer_op domain_crash_synchronous
 #define compat_grant_table_op domain_crash_synchronous
 #define compat_acm_op domain_crash_synchronous
-#define compat_arch_sched_op domain_crash_synchronous
 #define compat_xenoprof_op domain_crash_synchronous
 #define compat_sysctl domain_crash_synchronous
 #define compat_domctl domain_crash_synchronous
@@ -317,7 +315,7 @@ ENTRY(compat_hypercall_table)
         .quad compat_mmuext_op
         .quad compat_acm_op
         .quad compat_nmi_op
-        .quad compat_arch_sched_op
+        .quad compat_sched_op
         .quad compat_callback_op        /* 30 */
         .quad compat_xenoprof_op
         .quad do_event_channel_op
@@ -359,7 +357,7 @@ ENTRY(compat_hypercall_args_table)
         .byte 4 /* compat_mmuext_op         */
         .byte 1 /* compat_acm_op            */
         .byte 2 /* compat_nmi_op            */
-        .byte 2 /* compat_arch_sched_op     */
+        .byte 2 /* compat_sched_op          */
         .byte 2 /* compat_callback_op       */  /* 30 */
         .byte 2 /* compat_xenoprof_op       */
         .byte 2 /* compat_event_channel_op  */
diff -r c2a82e026497 -r 883c0080dd05 xen/common/Makefile
--- a/xen/common/Makefile       Fri Jan 05 17:34:34 2007 +0000
+++ b/xen/common/Makefile       Fri Jan 05 17:34:35 2007 +0000
@@ -39,3 +39,8 @@ subdir-$(CONFIG_COMPAT) += compat
 
 # Object file contains changeset and compiler information.
 version.o: $(BASEDIR)/include/xen/compile.h
+
+ifeq ($(CONFIG_COMPAT),y)
+# extra dependencies
+schedule.o: compat/schedule.c
+endif
diff -r c2a82e026497 -r 883c0080dd05 xen/common/compat/schedule.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/common/compat/schedule.c      Fri Jan 05 17:34:35 2007 +0000
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * schedule.c
+ *
+ */
+
+#include <compat/sched.h>
+
+#define COMPAT
+#define ret_t int
+
+#define do_sched_op compat_sched_op
+
+#define xen_sched_shutdown sched_shutdown
+CHECK_sched_shutdown;
+#undef xen_sched_shutdown
+
+#define xen_sched_remote_shutdown sched_remote_shutdown
+CHECK_sched_remote_shutdown;
+#undef xen_sched_remote_shutdown
+
+static int compat_poll(struct compat_sched_poll *compat)
+{
+    struct sched_poll native;
+
+#define XLAT_sched_poll_HNDL_ports(_d_, _s_) \
+    guest_from_compat_handle((_d_)->ports, (_s_)->ports)
+    XLAT_sched_poll(&native, compat);
+#undef XLAT_sched_poll_HNDL_ports
+
+    return do_poll(&native);
+}
+
+#define do_poll compat_poll
+#define sched_poll compat_sched_poll
+
+#include "../schedule.c"
+
+int compat_set_timer_op(u32 lo, s32 hi)
+{
+    return do_set_timer_op(((s64)hi << 32) | lo);
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r c2a82e026497 -r 883c0080dd05 xen/common/schedule.c
--- a/xen/common/schedule.c     Fri Jan 05 17:34:34 2007 +0000
+++ b/xen/common/schedule.c     Fri Jan 05 17:34:35 2007 +0000
@@ -13,6 +13,7 @@
  *
  */
 
+#ifndef COMPAT
 #include <xen/config.h>
 #include <xen/init.h>
 #include <xen/lib.h>
@@ -366,9 +367,13 @@ long do_sched_op_compat(int cmd, unsigne
     return ret;
 }
 
-long do_sched_op(int cmd, XEN_GUEST_HANDLE(void) arg)
-{
-    long ret = 0;
+typedef long ret_t;
+
+#endif /* !COMPAT */
+
+ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE(void) arg)
+{
+    ret_t ret = 0;
 
     switch ( cmd )
     {
@@ -444,6 +449,8 @@ long do_sched_op(int cmd, XEN_GUEST_HAND
 
     return ret;
 }
+
+#ifndef COMPAT
 
 /* Per-domain one-shot-timer hypercall. */
 long do_set_timer_op(s_time_t timeout)
@@ -736,6 +743,12 @@ void dump_runq(unsigned char key)
     local_irq_restore(flags);
 }
 
+#ifdef CONFIG_COMPAT
+#include "compat/schedule.c"
+#endif
+
+#endif /* !COMPAT */
+
 /*
  * Local variables:
  * mode: C
diff -r c2a82e026497 -r 883c0080dd05 xen/include/xlat.lst
--- a/xen/include/xlat.lst      Fri Jan 05 17:34:34 2007 +0000
+++ b/xen/include/xlat.lst      Fri Jan 05 17:34:35 2007 +0000
@@ -26,4 +26,7 @@
 !      memory_map                      memory.h
 !      memory_reservation              memory.h
 !      translate_gpfn_list             memory.h
+!      sched_poll                      sched.h
+?      sched_remote_shutdown           sched.h
+?      sched_shutdown                  sched.h
 !      vcpu_runstate_info              vcpu.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-unstable] Enable compatibility mode operation for HYPERVISOR_sched_op and, Xen patchbot-unstable <=