From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH] ia64 build fixes Date: Sat, 01 Apr 2006 14:46:51 -0700 Message-ID: <1143928012.18506.56.camel@localhost> References: <1143848687.18506.39.camel@localhost> <59eb0566983d683b79d83d50ac6dfadd@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <59eb0566983d683b79d83d50ac6dfadd@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel , xen-ia64-devel List-Id: xen-devel@lists.xenproject.org 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 --- 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);