All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-16 19:24 ` Jeff Dike
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

* [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-16 19:24 ` Jeff Dike
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Dike @ 2007-07-16 19:24 UTC (permalink / raw)
  To: Avi Kivity; +Cc: KVM devel, LKML

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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
--
 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;

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-17  8:15   ` Avi Kivity
  0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2007-07-17  8:15 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Jeff Dike, LKML, KVM devel

Jeff Dike wrote:
> 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;
>   

Anthony?  I think you were hacking this area?

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-17  8:15   ` Avi Kivity
  0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2007-07-17  8:15 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: KVM devel, Jeff Dike, LKML

Jeff Dike wrote:
> 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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> --
>  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;
>   

Anthony?  I think you were hacking this area?

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

* Re: [kvm-devel] [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-17 13:42     ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2007-07-17 13:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Anthony Liguori, KVM devel, Jeff Dike, LKML

Avi Kivity wrote:
> Jeff Dike wrote:
>   
>> 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;
>>   
>>     
>
> Anthony?  I think you were hacking this area?
>   

I make a similar change in my series.

Regards,

Anthony Liguori



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

* Re: [PATCH 2/3] KVM - Fix hypercall arguments
@ 2007-07-17 13:42     ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2007-07-17 13:42 UTC (permalink / raw)
  To: Avi Kivity; +Cc: KVM devel, Jeff Dike, LKML

Avi Kivity wrote:
> Jeff Dike wrote:
>   
>> 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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>> --
>>  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;
>>   
>>     
>
> Anthony?  I think you were hacking this area?
>   

I make a similar change in my series.

Regards,

Anthony Liguori



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

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

Thread overview: 6+ 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-16 19:24 ` Jeff Dike
2007-07-17  8:15 ` Avi Kivity
2007-07-17  8:15   ` Avi Kivity
2007-07-17 13:42   ` [kvm-devel] " Anthony Liguori
2007-07-17 13:42     ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.