From: kaf24@firebug.cl.cam.ac.uk Date: Mon, 30 Jan 2006 12:33:43 +0000 (+0100) Subject: I found some mistakes of argument by the do_* functions of hypercall. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16509 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3694aadc2d006f7a3d88567b3fe9b772ac53eba7;p=xen.git I found some mistakes of argument by the do_* functions of hypercall. This patch fixed those mistakes. Signed-off-by: Masaki Kanno --- diff --git a/xen/arch/ia64/vmx/vmx_hypercall.c b/xen/arch/ia64/vmx/vmx_hypercall.c index 020c3e933f..75c1cc9fb2 100644 --- a/xen/arch/ia64/vmx/vmx_hypercall.c +++ b/xen/arch/ia64/vmx/vmx_hypercall.c @@ -30,6 +30,7 @@ #include #include #include +#include void hyper_not_support(void) @@ -118,9 +119,10 @@ void hyper_dom_mem_op(void) void hyper_sched_op(void) { VCPU *vcpu=current; - u64 r32,ret; + u64 r32,r33,ret; vcpu_get_gr_nat(vcpu,16,&r32); - ret=do_sched_op(r32); + vcpu_get_gr_nat(vcpu,17,&r33); + ret=do_sched_op(r32,r33); vcpu_set_gr(vcpu, 8, ret, 0); vmx_vcpu_increment_iip(vcpu); @@ -150,9 +152,10 @@ void hyper_event_channel_op(void) void hyper_xen_version(void) { VCPU *vcpu=current; - u64 r32,ret; + u64 r32,r33,ret; vcpu_get_gr_nat(vcpu,16,&r32); - ret=do_xen_version((int )r32); + vcpu_get_gr_nat(vcpu,17,&r33); + ret=do_xen_version((int )r32,r33); vcpu_set_gr(vcpu, 8, ret, 0); vmx_vcpu_increment_iip(vcpu); } diff --git a/xen/arch/ia64/vmx/vmx_support.c b/xen/arch/ia64/vmx/vmx_support.c index 801eba6cf8..e6cd6cefb8 100644 --- a/xen/arch/ia64/vmx/vmx_support.c +++ b/xen/arch/ia64/vmx/vmx_support.c @@ -21,13 +21,15 @@ */ #include #include +#include +#include #include #include #include /* * I/O emulation should be atomic from domain point of view. However, - * when emulation code is waiting for I/O completion by do_block, + * when emulation code is waiting for I/O completion by blocking, * other events like DM interrupt, VBD, etc. may come and unblock * current exection flow. So we have to prepare for re-block if unblocked * by non I/O completion event. @@ -36,13 +38,12 @@ void vmx_wait_io(void) { struct vcpu *v = current; struct domain *d = v->domain; - extern void do_block(); int port = iopacket_port(d); do { if (!test_bit(port, &d->shared_info->evtchn_pending[0])) - do_block(); + do_sched_op(SCHEDOP_block, 0); /* Unblocked when some event is coming. Clear pending indication * immediately if deciding to go for io assist @@ -100,7 +101,7 @@ void vmx_io_assist(struct vcpu *v) if (test_bit(ARCH_VMX_IO_WAIT, &v->arch.arch_vmx.flags)) { if (p->state != STATE_IORESP_READY) { - /* Can't do_block here, for the same reason as other places to + /* Can't block here, for the same reason as other places to * use vmx_wait_io. Simple return is safe since vmx_wait_io will * try to block again */ diff --git a/xen/arch/ia64/xen/hypercall.c b/xen/arch/ia64/xen/hypercall.c index fd694e253f..34ebd0b355 100644 --- a/xen/arch/ia64/xen/hypercall.c +++ b/xen/arch/ia64/xen/hypercall.c @@ -8,6 +8,7 @@ #include #include +#include #include /* FOR EFI_UNIMPLEMENTED */ #include /* FOR struct ia64_sal_retval */ @@ -57,7 +58,7 @@ ia64_hypercall (struct pt_regs *regs) } else { pal_halt_light_count++; - do_sched_op(SCHEDOP_yield); + do_sched_op(SCHEDOP_yield, 0); } regs->r8 = 0; regs->r9 = 0; diff --git a/xen/arch/x86/vmx.c b/xen/arch/x86/vmx.c index 6d6fa51764..c0d3875073 100644 --- a/xen/arch/x86/vmx.c +++ b/xen/arch/x86/vmx.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -328,7 +329,6 @@ static inline int long_mode_do_msr_write(struct cpu_user_regs *regs){ #endif extern long evtchn_send(int lport); -extern long do_block(void); void do_nmi(struct cpu_user_regs *); static int check_vmx_controls(ctrls, msr) @@ -1599,7 +1599,7 @@ void vmx_vmexit_do_hlt(void) } if ( next_wakeup != - 1 ) set_timer(¤t->arch.arch_vmx.hlt_timer, next_wakeup); - do_block(); + do_sched_op(SCHEDOP_block, 0); } static inline void vmx_vmexit_do_extint(struct cpu_user_regs *regs) @@ -1801,14 +1801,12 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs regs) case TRAP_debug: { void store_cpu_user_regs(struct cpu_user_regs *regs); - long do_sched_op(unsigned long op); - store_cpu_user_regs(®s); __vm_clear_bit(GUEST_PENDING_DBG_EXCEPTIONS, PENDING_DEBUG_EXC_BS); domain_pause_for_debugger(); - do_sched_op(SCHEDOP_yield); + do_sched_op(SCHEDOP_yield, 0); break; } diff --git a/xen/arch/x86/vmx_io.c b/xen/arch/x86/vmx_io.c index c979a8d741..1ab368ff77 100644 --- a/xen/arch/x86/vmx_io.c +++ b/xen/arch/x86/vmx_io.c @@ -24,7 +24,7 @@ #include #include #include - +#include #include #include #include @@ -37,6 +37,7 @@ #include #include #include +#include #include #ifdef CONFIG_VMX @@ -756,12 +757,11 @@ void vmx_check_events(struct vcpu *v) the device model */ void vmx_wait_io() { - extern void do_block(); int port = iopacket_port(current->domain); do { if (!test_bit(port, ¤t->domain->shared_info->evtchn_pending[0])) - do_block(); + do_sched_op(SCHEDOP_block, 0); vmx_check_events(current); if (!test_bit(ARCH_VMX_IO_WAIT, ¤t->arch.arch_vmx.flags)) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 0ffa53a8fa..ef5c554a55 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -209,7 +209,7 @@ int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity) } /* Block the currently-executing domain until a pertinent event occurs. */ -long do_block(void) +static long do_block(void) { struct vcpu *v = current;