# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 085fa65de8095b8a55e5c6ad0ff59237b85bddcd
# Parent 58d6a94cd163c583f2497dd4281303aaa3638341
I found some mistakes of argument by the do_* functions of hypercall.
This patch fixed those mistakes.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
diff -r 58d6a94cd163 -r 085fa65de809 xen/arch/ia64/vmx/vmx_hypercall.c
--- a/xen/arch/ia64/vmx/vmx_hypercall.c Mon Jan 30 11:56:14 2006
+++ b/xen/arch/ia64/vmx/vmx_hypercall.c Mon Jan 30 12:33:43 2006
@@ -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,30 +119,31 @@
void hyper_sched_op(void)
{
VCPU *vcpu=current;
+ u64 r32,r33,ret;
+ vcpu_get_gr_nat(vcpu,16,&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);
+}
+
+void hyper_dom0_op(void)
+{
+ VCPU *vcpu=current;
u64 r32,ret;
vcpu_get_gr_nat(vcpu,16,&r32);
- ret=do_sched_op(r32);
- vcpu_set_gr(vcpu, 8, ret, 0);
-
- vmx_vcpu_increment_iip(vcpu);
-}
-
-void hyper_dom0_op(void)
+ ret=do_dom0_op((dom0_op_t *)r32);
+ vcpu_set_gr(vcpu, 8, ret, 0);
+
+ vmx_vcpu_increment_iip(vcpu);
+}
+
+void hyper_event_channel_op(void)
{
VCPU *vcpu=current;
u64 r32,ret;
vcpu_get_gr_nat(vcpu,16,&r32);
- ret=do_dom0_op((dom0_op_t *)r32);
- vcpu_set_gr(vcpu, 8, ret, 0);
-
- vmx_vcpu_increment_iip(vcpu);
-}
-
-void hyper_event_channel_op(void)
-{
- VCPU *vcpu=current;
- u64 r32,ret;
- vcpu_get_gr_nat(vcpu,16,&r32);
ret=do_event_channel_op((evtchn_op_t *)r32);
vcpu_set_gr(vcpu, 8, ret, 0);
vmx_vcpu_increment_iip(vcpu);
@@ -150,9 +152,10 @@
void hyper_xen_version(void)
{
VCPU *vcpu=current;
- u64 r32,ret;
- vcpu_get_gr_nat(vcpu,16,&r32);
- ret=do_xen_version((int )r32);
+ u64 r32,r33,ret;
+ vcpu_get_gr_nat(vcpu,16,&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 -r 58d6a94cd163 -r 085fa65de809 xen/arch/ia64/vmx/vmx_support.c
--- a/xen/arch/ia64/vmx/vmx_support.c Mon Jan 30 11:56:14 2006
+++ b/xen/arch/ia64/vmx/vmx_support.c Mon Jan 30 12:33:43 2006
@@ -21,13 +21,15 @@
*/
#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 @@
{
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 @@
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 -r 58d6a94cd163 -r 085fa65de809 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c Mon Jan 30 11:56:14 2006
+++ b/xen/arch/ia64/xen/hypercall.c Mon Jan 30 12:33:43 2006
@@ -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 @@
}
else {
pal_halt_light_count++;
- do_sched_op(SCHEDOP_yield);
+ do_sched_op(SCHEDOP_yield, 0);
}
regs->r8 = 0;
regs->r9 = 0;
diff -r 58d6a94cd163 -r 085fa65de809 xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c Mon Jan 30 11:56:14 2006
+++ b/xen/arch/x86/vmx.c Mon Jan 30 12:33:43 2006
@@ -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 @@
#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 @@
}
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 @@
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 -r 58d6a94cd163 -r 085fa65de809 xen/arch/x86/vmx_io.c
--- a/xen/arch/x86/vmx_io.c Mon Jan 30 11:56:14 2006
+++ b/xen/arch/x86/vmx_io.c Mon Jan 30 12:33:43 2006
@@ -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 @@
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 -r 58d6a94cd163 -r 085fa65de809 xen/common/schedule.c
--- a/xen/common/schedule.c Mon Jan 30 11:56:14 2006
+++ b/xen/common/schedule.c Mon Jan 30 12:33:43 2006
@@ -209,7 +209,7 @@
}
/* Block the currently-executing domain until a pertinent event occurs. */
-long do_block(void)
+static long do_block(void)
{
struct vcpu *v = current;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|