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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH,RFC 15/17] 32-on-64 sched ops

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH,RFC 15/17] 32-on-64 sched ops
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: 2006年10月04日 17:44:42 +0200
Delivery-date: 2006年10月04日 08:44:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Index: 2006年10月04日/xen/arch/x86/x86_64/compat/entry.S
===================================================================
--- 2006年10月04日.orig/xen/arch/x86/x86_64/compat/entry.S 2006年10月04日 
15:20:16.000000000 +0200
+++ 2006年10月04日/xen/arch/x86/x86_64/compat/entry.S 2006年10月04日 
15:20:20.000000000 +0200
@@ -276,13 +276,18 @@ CFIX14:
 .quad CFLT14,CFIX14
 .previous
 
+compat_arch_sched_op:
+ # Ensure we return success even if we return via schedule_tail()
+ xorl %eax,%eax
+ GET_GUEST_REGS(%r10)
+ movl %eax,UREGS_rax(%r10)
+ jmp compat_sched_op
+
 .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
Index: 2006年10月04日/xen/common/Makefile
===================================================================
--- 2006年10月04日.orig/xen/common/Makefile 2006年10月04日 15:09:52.000000000 +0200
+++ 2006年10月04日/xen/common/Makefile 2006年10月04日 15:20:20.000000000 +0200
@@ -34,3 +34,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
Index: 2006年10月04日/xen/common/compat/schedule.c
===================================================================
--- /dev/null 1970年01月01日 00:00:00.000000000 +0000
+++ 2006年10月04日/xen/common/compat/schedule.c 2006年10月04日 15:20:20.000000000 
+0200
@@ -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:
+ */
Index: 2006年10月04日/xen/common/schedule.c
===================================================================
--- 2006年10月04日.orig/xen/common/schedule.c 2006年10月04日 15:11:03.000000000 
+0200
+++ 2006年10月04日/xen/common/schedule.c 2006年10月04日 15:20:20.000000000 +0200
@@ -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)
+typedef long ret_t;
+
+#endif /* !COMPAT */
+
+ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE(void) arg)
 {
- long ret = 0;
+ ret_t ret = 0;
 
 switch ( cmd )
 {
@@ -445,6 +450,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)
 {
@@ -735,6 +742,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
Index: 2006年10月04日/xen/include/xlat.lst
===================================================================
--- 2006年10月04日.orig/xen/include/xlat.lst 2006年10月04日 15:20:09.000000000 
+0200
+++ 2006年10月04日/xen/include/xlat.lst 2006年10月04日 15:20:20.000000000 +0200
@@ -25,4 +25,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH,RFC 15/17] 32-on-64 sched ops, Jan Beulich <=
Previous by Date: [Xen-devel] [PATCH,RFC 14/17] 32-on-64 multicalls , Jan Beulich
Next by Date: [Xen-devel] [PATCH,RFC 16/17] 32-on-64 grant table ops , Jan Beulich
Previous by Thread: [Xen-devel] [PATCH,RFC 14/17] 32-on-64 multicalls , Jan Beulich
Next by Thread: [Xen-devel] [PATCH,RFC 16/17] 32-on-64 grant table ops , Jan Beulich
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /