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-devel

[Xen-devel] Re: [PATCH] ia64 build fixes

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] ia64 build fixes
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Sat, 01 Apr 2006 14:46:51 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 01 Apr 2006 21:48:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <59eb0566983d683b79d83d50ac6dfadd@xxxxxxxxxxxx>
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>
Organization: LOSL
References: <1143848687.18506.39.camel@localhost> <59eb0566983d683b79d83d50ac6dfadd@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2006-04-01 at 11:10 +0100, Keir Fraser wrote:
> Taken, thanks. Can you also look at supporting HYPERVISOR_sched_op() 
> before 3.0.2, in addition to the old HYPERVISOR_sched_op_compat()?

Keir,

   Here's a patch that enables HYPERVISOR_sched_op() and
HYPERVISOR_sched_opt_compat() for ia64.  We currently have no users of
this call, but there's no harm in enabling it (tested by adding a
HYPERVISOR_yield() call to default_idle()).  I did notice a problem with
the compat interface though, nothing defines __XEN_INTERFACE_VERSION__
for the build of xen.  We're therefore stuck on interface version
0x00000000 where __HYPERVISOR_sched_op_compat == __HYPERVISOR_sched_op.
Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r 60071beccf18 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Sat Apr  1 14:59:12 2006 +0100
+++ b/xen/arch/ia64/xen/hypercall.c     Sat Apr  1 14:35:19 2006 -0700
@@ -38,7 +38,7 @@ hypercall_t ia64_hypercall_table[] =
        (hypercall_t)do_ni_hypercall,           /* do_stack_switch */
        (hypercall_t)do_ni_hypercall,           /* do_set_callbacks */
        (hypercall_t)do_ni_hypercall,           /* do_fpu_taskswitch */         
/*  5 */
-       (hypercall_t)do_ni_hypercall,           /* do_sched_op_compat */
+       (hypercall_t)do_sched_op_compat,
        (hypercall_t)do_dom0_op,
        (hypercall_t)do_ni_hypercall,           /* do_set_debugreg */
        (hypercall_t)do_ni_hypercall,           /* do_get_debugreg */
@@ -61,7 +61,7 @@ hypercall_t ia64_hypercall_table[] =
        (hypercall_t)do_ni_hypercall,           /* do_mmuext_op */
        (hypercall_t)do_ni_hypercall,           /* do_acm_op */
        (hypercall_t)do_ni_hypercall,           /* do_nmi_op */
-       (hypercall_t)do_ni_hypercall,           /*  */
+       (hypercall_t)do_sched_op,
        (hypercall_t)do_ni_hypercall,           /*  */                          
/* 30 */
        (hypercall_t)do_ni_hypercall            /*  */
        };
@@ -70,6 +70,11 @@ xen_hypercall (struct pt_regs *regs)
 xen_hypercall (struct pt_regs *regs)
 {
        switch (regs->r2) {
+           case __HYPERVISOR_sched_op_compat:
+               regs->r8 = do_sched_op_compat((int) regs->r14,
+                                             (unsigned long) regs->r15);
+               break;
+
            case __HYPERVISOR_dom0_op:
                regs->r8 = do_dom0_op(guest_handle_from_ptr(regs->r14,
                                                            dom0_op_t));
@@ -116,6 +121,13 @@ xen_hypercall (struct pt_regs *regs)
            case __HYPERVISOR_multicall:
                regs->r8 = do_multicall(guest_handle_from_ptr(regs->r14, 
multicall_entry_t), (unsigned int) regs->r15);
                break;
+
+#if __XEN_INTERFACE_VERSION__ >= 0x00030101
+           case __HYPERVISOR_sched_op:
+               regs->r8 = do_sched_op((int) regs->r14,
+                                      guest_handle_from_ptr(regs->r15, void));
+               break;
+#endif
 
            default:
                printf("unknown xen hypercall %lx\n", regs->r2);



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