public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-16 19:24 Jeff Dike
  2007-07-17  8:15 ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Dike @ 2007-07-16 19:24 UTC (permalink / raw)
  To: Avi Kivity; +Cc: LKML, KVM devel

It looks like kvm_hypercall is trying to match the system call
convention and mixed up the call number and first argument in the
32-bit case.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
 drivers/kvm/kvm_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: kvm/drivers/kvm/kvm_main.c
===================================================================
--- kvm.orig/drivers/kvm/kvm_main.c
+++ kvm/drivers/kvm/kvm_main.c
@@ -1351,8 +1351,8 @@ int kvm_hypercall(struct kvm_vcpu *vcpu,
 	} else
 #endif
 	{
-		nr = vcpu->regs[VCPU_REGS_RBX] & -1u;
-		a0 = vcpu->regs[VCPU_REGS_RAX] & -1u;
+		nr = vcpu->regs[VCPU_REGS_RAX] & -1u;
+		a0 = vcpu->regs[VCPU_REGS_RBX] & -1u;
 		a1 = vcpu->regs[VCPU_REGS_RCX] & -1u;
 		a2 = vcpu->regs[VCPU_REGS_RDX] & -1u;
 		a3 = vcpu->regs[VCPU_REGS_RSI] & -1u;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-17 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 19:24 [PATCH 2/3] KVM - Fix hypercall arguments Jeff Dike
2007-07-17  8:15 ` Avi Kivity
2007-07-17 13:42   ` [kvm-devel] " Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox