ia64/xen-unstable

changeset 8775:74b1de89e9f7

[IA64] added multicall

This patch added multicall hypercall.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Thu Feb 09 08:48:47 2006 -0700 (2006-02-09)
parents 2710f2fe624a
children 535d29342e42
files xen/arch/ia64/xen/hypercall.c xen/include/asm-ia64/multicall.h
line diff
     1.1 --- a/xen/arch/ia64/xen/hypercall.c	Tue Feb 07 12:59:27 2006 +0100
     1.2 +++ b/xen/arch/ia64/xen/hypercall.c	Thu Feb 09 08:48:47 2006 -0700
     1.3 @@ -9,6 +9,7 @@
     1.4  #include <xen/config.h>
     1.5  #include <xen/sched.h>
     1.6  #include <xen/hypercall.h>
     1.7 +#include <xen/multicall.h>
     1.8  
     1.9  #include <linux/efi.h>	/* FOR EFI_UNIMPLEMENTED */
    1.10  #include <asm/sal.h>	/* FOR struct ia64_sal_retval */
    1.11 @@ -23,6 +24,42 @@ extern unsigned long translate_domain_mp
    1.12  unsigned long idle_when_pending = 0;
    1.13  unsigned long pal_halt_light_count = 0;
    1.14  
    1.15 +hypercall_t ia64_hypercall_table[] =
    1.16 +	{
    1.17 +	(hypercall_t)do_ni_hypercall,		/* do_set_trap_table */		/*  0 */
    1.18 +	(hypercall_t)do_ni_hypercall,		/* do_mmu_update */
    1.19 +	(hypercall_t)do_ni_hypercall,		/* do_set_gdt */
    1.20 +	(hypercall_t)do_ni_hypercall,		/* do_stack_switch */
    1.21 +	(hypercall_t)do_ni_hypercall,		/* do_set_callbacks */
    1.22 +	(hypercall_t)do_ni_hypercall,		/* do_fpu_taskswitch */		/*  5 */
    1.23 +	(hypercall_t)do_ni_hypercall,		/* do_sched_op */
    1.24 +	(hypercall_t)do_dom0_op,
    1.25 +	(hypercall_t)do_ni_hypercall,		/* do_set_debugreg */
    1.26 +	(hypercall_t)do_ni_hypercall,		/* do_get_debugreg */
    1.27 +	(hypercall_t)do_ni_hypercall,		/* do_update_descriptor */	/* 10 */
    1.28 +	(hypercall_t)do_ni_hypercall,		/* do_ni_hypercall */
    1.29 +	(hypercall_t)do_memory_op,
    1.30 +	(hypercall_t)do_multicall,
    1.31 +	(hypercall_t)do_ni_hypercall,		/* do_update_va_mapping */
    1.32 +	(hypercall_t)do_ni_hypercall,		/* do_set_timer_op */		/* 15 */
    1.33 +	(hypercall_t)do_event_channel_op,
    1.34 +	(hypercall_t)do_xen_version,
    1.35 +	(hypercall_t)do_console_io,
    1.36 +	(hypercall_t)do_ni_hypercall,           /* do_physdev_op */
    1.37 +	(hypercall_t)do_grant_table_op,						/* 20 */
    1.38 +	(hypercall_t)do_ni_hypercall,		/* do_vm_assist */
    1.39 +	(hypercall_t)do_ni_hypercall,		/* do_update_va_mapping_otherdomain */
    1.40 +	(hypercall_t)do_ni_hypercall,		/* (x86 only) */
    1.41 +	(hypercall_t)do_ni_hypercall,		/* do_vcpu_op */
    1.42 +	(hypercall_t)do_ni_hypercall,		/* (x86_64 only) */		/* 25 */
    1.43 +	(hypercall_t)do_ni_hypercall,		/* do_mmuext_op */
    1.44 +	(hypercall_t)do_ni_hypercall,		/* do_acm_op */
    1.45 +	(hypercall_t)do_ni_hypercall,		/* do_nmi_op */
    1.46 +	(hypercall_t)do_ni_hypercall,		/*  */
    1.47 +	(hypercall_t)do_ni_hypercall,		/*  */				/* 30 */
    1.48 +	(hypercall_t)do_ni_hypercall		/*  */
    1.49 +	};
    1.50 +
    1.51  int
    1.52  ia64_hypercall (struct pt_regs *regs)
    1.53  {
    1.54 @@ -181,9 +218,13 @@ ia64_hypercall (struct pt_regs *regs)
    1.55  		regs->r8 = do_xen_version(regs->r14, regs->r15);
    1.56  		break;
    1.57  
    1.58 +	    case __HYPERVISOR_multicall:
    1.59 +		regs->r8 = do_multicall(regs->r14, regs->r15);
    1.60 +		break;
    1.61 +
    1.62  	    default:
    1.63  		printf("unknown hypercall %x\n", regs->r2);
    1.64 -		regs->r8 = (unsigned long)-1;
    1.65 +		regs->r8 = do_ni_hypercall();
    1.66  	}
    1.67  	return 1;
    1.68  }
     2.1 --- a/xen/include/asm-ia64/multicall.h	Tue Feb 07 12:59:27 2006 +0100
     2.2 +++ b/xen/include/asm-ia64/multicall.h	Thu Feb 09 08:48:47 2006 -0700
     2.3 @@ -1,5 +1,27 @@
     2.4  #ifndef __ASM_IA64_MULTICALL_H__
     2.5  #define __ASM_IA64_MULTICALL_H__
     2.6  
     2.7 -#define do_multicall_call(_call) BUG()
     2.8 +#include <public/xen.h>
     2.9 +
    2.10 +typedef unsigned long (*hypercall_t)(
    2.11 +			unsigned long arg0,
    2.12 +			unsigned long arg1,
    2.13 +			unsigned long arg2,
    2.14 +			unsigned long arg3,
    2.15 +			unsigned long arg4,
    2.16 +			unsigned long arg5);
    2.17 +
    2.18 +extern hypercall_t ia64_hypercall_table[];
    2.19 +
    2.20 +static inline void do_multicall_call(multicall_entry_t *call)
    2.21 +{
    2.22 +	call->result = (*ia64_hypercall_table[call->op])(
    2.23 +			call->args[0],
    2.24 +			call->args[1],
    2.25 +			call->args[2],
    2.26 +			call->args[3],
    2.27 +			call->args[4],
    2.28 +			call->args[5]);
    2.29 +}
    2.30 +
    2.31  #endif /* __ASM_IA64_MULTICALL_H__ */