ia64/xen-unstable
changeset 8704:085fa65de809
I found some mistakes of argument by the do_* functions of hypercall.
This patch fixed those mistakes.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This patch fixed those mistakes.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Jan 30 13:33:43 2006 +0100 (2006-01-30) |
parents | 58d6a94cd163 |
children | 690fc13948db |
files | xen/arch/ia64/vmx/vmx_hypercall.c xen/arch/ia64/vmx/vmx_support.c xen/arch/ia64/xen/hypercall.c xen/arch/x86/vmx.c xen/arch/x86/vmx_io.c xen/common/schedule.c |
line diff
1.1 --- a/xen/arch/ia64/vmx/vmx_hypercall.c Mon Jan 30 12:56:14 2006 +0100 1.2 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c Mon Jan 30 13:33:43 2006 +0100 1.3 @@ -30,6 +30,7 @@ 1.4 #include <asm/page.h> 1.5 #include <xen/mm.h> 1.6 #include <xen/multicall.h> 1.7 +#include <xen/hypercall.h> 1.8 1.9 1.10 void hyper_not_support(void) 1.11 @@ -118,9 +119,10 @@ void hyper_dom_mem_op(void) 1.12 void hyper_sched_op(void) 1.13 { 1.14 VCPU *vcpu=current; 1.15 - u64 r32,ret; 1.16 + u64 r32,r33,ret; 1.17 vcpu_get_gr_nat(vcpu,16,&r32); 1.18 - ret=do_sched_op(r32); 1.19 + vcpu_get_gr_nat(vcpu,17,&r33); 1.20 + ret=do_sched_op(r32,r33); 1.21 vcpu_set_gr(vcpu, 8, ret, 0); 1.22 1.23 vmx_vcpu_increment_iip(vcpu); 1.24 @@ -150,9 +152,10 @@ void hyper_event_channel_op(void) 1.25 void hyper_xen_version(void) 1.26 { 1.27 VCPU *vcpu=current; 1.28 - u64 r32,ret; 1.29 + u64 r32,r33,ret; 1.30 vcpu_get_gr_nat(vcpu,16,&r32); 1.31 - ret=do_xen_version((int )r32); 1.32 + vcpu_get_gr_nat(vcpu,17,&r33); 1.33 + ret=do_xen_version((int )r32,r33); 1.34 vcpu_set_gr(vcpu, 8, ret, 0); 1.35 vmx_vcpu_increment_iip(vcpu); 1.36 }
2.1 --- a/xen/arch/ia64/vmx/vmx_support.c Mon Jan 30 12:56:14 2006 +0100 2.2 +++ b/xen/arch/ia64/vmx/vmx_support.c Mon Jan 30 13:33:43 2006 +0100 2.3 @@ -21,13 +21,15 @@ 2.4 */ 2.5 #include <xen/config.h> 2.6 #include <xen/sched.h> 2.7 +#include <xen/hypercall.h> 2.8 +#include <public/sched.h> 2.9 #include <public/hvm/ioreq.h> 2.10 #include <asm/vmx.h> 2.11 #include <asm/vmx_vcpu.h> 2.12 2.13 /* 2.14 * I/O emulation should be atomic from domain point of view. However, 2.15 - * when emulation code is waiting for I/O completion by do_block, 2.16 + * when emulation code is waiting for I/O completion by blocking, 2.17 * other events like DM interrupt, VBD, etc. may come and unblock 2.18 * current exection flow. So we have to prepare for re-block if unblocked 2.19 * by non I/O completion event. 2.20 @@ -36,13 +38,12 @@ void vmx_wait_io(void) 2.21 { 2.22 struct vcpu *v = current; 2.23 struct domain *d = v->domain; 2.24 - extern void do_block(); 2.25 int port = iopacket_port(d); 2.26 2.27 do { 2.28 if (!test_bit(port, 2.29 &d->shared_info->evtchn_pending[0])) 2.30 - do_block(); 2.31 + do_sched_op(SCHEDOP_block, 0); 2.32 2.33 /* Unblocked when some event is coming. Clear pending indication 2.34 * immediately if deciding to go for io assist 2.35 @@ -100,7 +101,7 @@ void vmx_io_assist(struct vcpu *v) 2.36 2.37 if (test_bit(ARCH_VMX_IO_WAIT, &v->arch.arch_vmx.flags)) { 2.38 if (p->state != STATE_IORESP_READY) { 2.39 - /* Can't do_block here, for the same reason as other places to 2.40 + /* Can't block here, for the same reason as other places to 2.41 * use vmx_wait_io. Simple return is safe since vmx_wait_io will 2.42 * try to block again 2.43 */
3.1 --- a/xen/arch/ia64/xen/hypercall.c Mon Jan 30 12:56:14 2006 +0100 3.2 +++ b/xen/arch/ia64/xen/hypercall.c Mon Jan 30 13:33:43 2006 +0100 3.3 @@ -8,6 +8,7 @@ 3.4 3.5 #include <xen/config.h> 3.6 #include <xen/sched.h> 3.7 +#include <xen/hypercall.h> 3.8 3.9 #include <linux/efi.h> /* FOR EFI_UNIMPLEMENTED */ 3.10 #include <asm/sal.h> /* FOR struct ia64_sal_retval */ 3.11 @@ -57,7 +58,7 @@ ia64_hypercall (struct pt_regs *regs) 3.12 } 3.13 else { 3.14 pal_halt_light_count++; 3.15 - do_sched_op(SCHEDOP_yield); 3.16 + do_sched_op(SCHEDOP_yield, 0); 3.17 } 3.18 regs->r8 = 0; 3.19 regs->r9 = 0;
4.1 --- a/xen/arch/x86/vmx.c Mon Jan 30 12:56:14 2006 +0100 4.2 +++ b/xen/arch/x86/vmx.c Mon Jan 30 13:33:43 2006 +0100 4.3 @@ -25,6 +25,7 @@ 4.4 #include <xen/irq.h> 4.5 #include <xen/softirq.h> 4.6 #include <xen/domain_page.h> 4.7 +#include <xen/hypercall.h> 4.8 #include <asm/current.h> 4.9 #include <asm/io.h> 4.10 #include <asm/shadow.h> 4.11 @@ -328,7 +329,6 @@ static inline int long_mode_do_msr_writ 4.12 #endif 4.13 4.14 extern long evtchn_send(int lport); 4.15 -extern long do_block(void); 4.16 void do_nmi(struct cpu_user_regs *); 4.17 4.18 static int check_vmx_controls(ctrls, msr) 4.19 @@ -1599,7 +1599,7 @@ void vmx_vmexit_do_hlt(void) 4.20 } 4.21 if ( next_wakeup != - 1 ) 4.22 set_timer(¤t->arch.arch_vmx.hlt_timer, next_wakeup); 4.23 - do_block(); 4.24 + do_sched_op(SCHEDOP_block, 0); 4.25 } 4.26 4.27 static inline void vmx_vmexit_do_extint(struct cpu_user_regs *regs) 4.28 @@ -1801,14 +1801,12 @@ asmlinkage void vmx_vmexit_handler(struc 4.29 case TRAP_debug: 4.30 { 4.31 void store_cpu_user_regs(struct cpu_user_regs *regs); 4.32 - long do_sched_op(unsigned long op); 4.33 - 4.34 4.35 store_cpu_user_regs(®s); 4.36 __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS, PENDING_DEBUG_EXC_BS); 4.37 4.38 domain_pause_for_debugger(); 4.39 - do_sched_op(SCHEDOP_yield); 4.40 + do_sched_op(SCHEDOP_yield, 0); 4.41 4.42 break; 4.43 }
5.1 --- a/xen/arch/x86/vmx_io.c Mon Jan 30 12:56:14 2006 +0100 5.2 +++ b/xen/arch/x86/vmx_io.c Mon Jan 30 13:33:43 2006 +0100 5.3 @@ -24,7 +24,7 @@ 5.4 #include <xen/errno.h> 5.5 #include <xen/trace.h> 5.6 #include <xen/event.h> 5.7 - 5.8 +#include <xen/hypercall.h> 5.9 #include <asm/current.h> 5.10 #include <asm/cpufeature.h> 5.11 #include <asm/processor.h> 5.12 @@ -37,6 +37,7 @@ 5.13 #include <asm/shadow.h> 5.14 #include <asm/vmx_vpic.h> 5.15 #include <asm/vmx_vlapic.h> 5.16 +#include <public/sched.h> 5.17 #include <public/hvm/ioreq.h> 5.18 5.19 #ifdef CONFIG_VMX 5.20 @@ -756,12 +757,11 @@ void vmx_check_events(struct vcpu *v) 5.21 the device model */ 5.22 void vmx_wait_io() 5.23 { 5.24 - extern void do_block(); 5.25 int port = iopacket_port(current->domain); 5.26 5.27 do { 5.28 if (!test_bit(port, ¤t->domain->shared_info->evtchn_pending[0])) 5.29 - do_block(); 5.30 + do_sched_op(SCHEDOP_block, 0); 5.31 5.32 vmx_check_events(current); 5.33 if (!test_bit(ARCH_VMX_IO_WAIT, ¤t->arch.arch_vmx.flags))
6.1 --- a/xen/common/schedule.c Mon Jan 30 12:56:14 2006 +0100 6.2 +++ b/xen/common/schedule.c Mon Jan 30 13:33:43 2006 +0100 6.3 @@ -209,7 +209,7 @@ int vcpu_set_affinity(struct vcpu *v, cp 6.4 } 6.5 6.6 /* Block the currently-executing domain until a pertinent event occurs. */ 6.7 -long do_block(void) 6.8 +static long do_block(void) 6.9 { 6.10 struct vcpu *v = current; 6.11