I found some mistakes of argument by the do_* functions of hypercall.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 30 Jan 2006 12:33:43 +0000 (13:33 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 30 Jan 2006 12:33:43 +0000 (13:33 +0100)
This patch fixed those mistakes.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
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

index 020c3e933f4060494d73d303bb2a5134c76d3ece..75c1cc9fb2121e6710c3c8e59fba1b10875215f3 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/page.h>
 #include <xen/mm.h>
 #include <xen/multicall.h>
+#include <xen/hypercall.h>
 
 
 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);
 }
index 801eba6cf8200544a76a2cbef7b1eb9580d79147..e6cd6cefb8b38b692cc1c737837a8e1ca4344e6e 100644 (file)
  */
 #include <xen/config.h>
 #include <xen/sched.h>
+#include <xen/hypercall.h>
+#include <public/sched.h>
 #include <public/hvm/ioreq.h>
 #include <asm/vmx.h>
 #include <asm/vmx_vcpu.h>
 
 /*
  * 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
             */
index fd694e253f532ba68af4ee3e05c52369b5de1405..34ebd0b355710ac2e4d88ada73dfc7e69fd69c80 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <xen/config.h>
 #include <xen/sched.h>
+#include <xen/hypercall.h>
 
 #include <linux/efi.h> /* FOR EFI_UNIMPLEMENTED */
 #include <asm/sal.h>   /* 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;
index 6d6fa517646b562ec3ae1d7b1d7ce7a258bc9c21..c0d38750731c067f4c9ec423372b8c6eadad3544 100644 (file)
@@ -25,6 +25,7 @@
 #include <xen/irq.h>
 #include <xen/softirq.h>
 #include <xen/domain_page.h>
+#include <xen/hypercall.h>
 #include <asm/current.h>
 #include <asm/io.h>
 #include <asm/shadow.h>
@@ -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(&current->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(&regs);
             __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;
         }
index c979a8d74152f497e9f829f8e777d12474e9eb11..1ab368ff770aa4798f9b2e72087a99cf1bd22452 100644 (file)
@@ -24,7 +24,7 @@
 #include <xen/errno.h>
 #include <xen/trace.h>
 #include <xen/event.h>
-
+#include <xen/hypercall.h>
 #include <asm/current.h>
 #include <asm/cpufeature.h>
 #include <asm/processor.h>
@@ -37,6 +37,7 @@
 #include <asm/shadow.h>
 #include <asm/vmx_vpic.h>
 #include <asm/vmx_vlapic.h>
+#include <public/sched.h>
 #include <public/hvm/ioreq.h>
 
 #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, &current->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, &current->arch.arch_vmx.flags))
index 0ffa53a8fa62af10689d978871badac7efc32f48..ef5c554a55fc14c96e6756dabca09c365b2b15b9 100644 (file)
@@ -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;