All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] minios: Correct HYPERVISOR_physdev_op()
@ 2014-01-24 18:28 Andrew Cooper
  2014-01-24 18:44 ` Konrad Rzeszutek Wilk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-01-24 18:28 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Samuel Thibault, Stefano Stabellini

A physdev_op is a two argument hypercall, taking a command paramter and an
optional pointer to a structure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    4 ++--
 extras/mini-os/include/x86/x86_64/hypercall-x86_64.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
index ef52ecd..dcfbe41 100644
--- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
+++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
@@ -255,9 +255,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
index 513d74e..7083763 100644
--- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
+++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
@@ -256,9 +256,9 @@ HYPERVISOR_console_io(
 
 static inline int
 HYPERVISOR_physdev_op(
-	void *physdev_op)
+	int cmd, void *physdev_op)
 {
-	return _hypercall1(int, physdev_op, physdev_op);
+	return _hypercall2(int, physdev_op, cmd, physdev_op);
 }
 
 static inline int
-- 
1.7.10.4

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

* Re: [PATCH] minios: Correct HYPERVISOR_physdev_op()
  2014-01-24 18:28 [PATCH] minios: Correct HYPERVISOR_physdev_op() Andrew Cooper
@ 2014-01-24 18:44 ` Konrad Rzeszutek Wilk
  2014-01-26 16:38 ` Samuel Thibault
  2014-01-27 17:18 ` Ian Campbell
  2 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-01-24 18:44 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Samuel Thibault, Stefano Stabellini, Xen-devel

On Fri, Jan 24, 2014 at 06:28:11PM +0000, Andrew Cooper wrote:
> A physdev_op is a two argument hypercall, taking a command paramter and an
                                                             ^^^^^^^- parameter
> optional pointer to a structure.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
>  extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    4 ++--
>  extras/mini-os/include/x86/x86_64/hypercall-x86_64.h |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> index ef52ecd..dcfbe41 100644
> --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> @@ -255,9 +255,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int
> diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> index 513d74e..7083763 100644
> --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> @@ -256,9 +256,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: [PATCH] minios: Correct HYPERVISOR_physdev_op()
  2014-01-24 18:28 [PATCH] minios: Correct HYPERVISOR_physdev_op() Andrew Cooper
  2014-01-24 18:44 ` Konrad Rzeszutek Wilk
@ 2014-01-26 16:38 ` Samuel Thibault
  2014-01-27 17:18 ` Ian Campbell
  2 siblings, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2014-01-26 16:38 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Stefano Stabellini, Xen-devel

Andrew Cooper, le Fri 24 Jan 2014 18:28:11 +0000, a écrit :
> A physdev_op is a two argument hypercall, taking a command paramter and an
> optional pointer to a structure.

Mmm, this this a remnant of the old hypercall which was taking one
parameter only, indeed.

> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    4 ++--
>  extras/mini-os/include/x86/x86_64/hypercall-x86_64.h |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> index ef52ecd..dcfbe41 100644
> --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> @@ -255,9 +255,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int
> diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> index 513d74e..7083763 100644
> --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> @@ -256,9 +256,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int
> -- 
> 1.7.10.4
> 

-- 
Samuel
#include <culture.h>

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

* Re: [PATCH] minios: Correct HYPERVISOR_physdev_op()
  2014-01-24 18:28 [PATCH] minios: Correct HYPERVISOR_physdev_op() Andrew Cooper
  2014-01-24 18:44 ` Konrad Rzeszutek Wilk
  2014-01-26 16:38 ` Samuel Thibault
@ 2014-01-27 17:18 ` Ian Campbell
  2014-01-27 17:20   ` Andrew Cooper
  2 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2014-01-27 17:18 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Samuel Thibault, Stefano Stabellini, Xen-devel

On Fri, 2014-01-24 at 18:28 +0000, Andrew Cooper wrote:
> A physdev_op is a two argument hypercall, taking a command paramter and an
> optional pointer to a structure.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>

This hypercall is unused in minios and stubdoms I think? (Trying to
gauge how critical the error is).

> ---
>  extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    4 ++--
>  extras/mini-os/include/x86/x86_64/hypercall-x86_64.h |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> index ef52ecd..dcfbe41 100644
> --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
> @@ -255,9 +255,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int
> diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> index 513d74e..7083763 100644
> --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
> @@ -256,9 +256,9 @@ HYPERVISOR_console_io(
>  
>  static inline int
>  HYPERVISOR_physdev_op(
> -	void *physdev_op)
> +	int cmd, void *physdev_op)
>  {
> -	return _hypercall1(int, physdev_op, physdev_op);
> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>  }
>  
>  static inline int

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

* Re: [PATCH] minios: Correct HYPERVISOR_physdev_op()
  2014-01-27 17:18 ` Ian Campbell
@ 2014-01-27 17:20   ` Andrew Cooper
  2014-01-28 11:47     ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cooper @ 2014-01-27 17:20 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Samuel Thibault, Stefano Stabellini, Xen-devel

On 27/01/14 17:18, Ian Campbell wrote:
> On Fri, 2014-01-24 at 18:28 +0000, Andrew Cooper wrote:
>> A physdev_op is a two argument hypercall, taking a command paramter and an
>> optional pointer to a structure.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> This hypercall is unused in minios and stubdoms I think? (Trying to
> gauge how critical the error is).

Correct.  I suppose it is more of a "nice to fix" than "must fix" at
this stage, although I was quite surprised that I needed to fix it.

~Andrew

>
>> ---
>>  extras/mini-os/include/x86/x86_32/hypercall-x86_32.h |    4 ++--
>>  extras/mini-os/include/x86/x86_64/hypercall-x86_64.h |    4 ++--
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
>> index ef52ecd..dcfbe41 100644
>> --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
>> +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
>> @@ -255,9 +255,9 @@ HYPERVISOR_console_io(
>>  
>>  static inline int
>>  HYPERVISOR_physdev_op(
>> -	void *physdev_op)
>> +	int cmd, void *physdev_op)
>>  {
>> -	return _hypercall1(int, physdev_op, physdev_op);
>> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>>  }
>>  
>>  static inline int
>> diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
>> index 513d74e..7083763 100644
>> --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
>> +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
>> @@ -256,9 +256,9 @@ HYPERVISOR_console_io(
>>  
>>  static inline int
>>  HYPERVISOR_physdev_op(
>> -	void *physdev_op)
>> +	int cmd, void *physdev_op)
>>  {
>> -	return _hypercall1(int, physdev_op, physdev_op);
>> +	return _hypercall2(int, physdev_op, cmd, physdev_op);
>>  }
>>  
>>  static inline int
>

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

* Re: [PATCH] minios: Correct HYPERVISOR_physdev_op()
  2014-01-27 17:20   ` Andrew Cooper
@ 2014-01-28 11:47     ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2014-01-28 11:47 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Samuel Thibault, Stefano Stabellini, Xen-devel

On Mon, 2014-01-27 at 17:20 +0000, Andrew Cooper wrote:
> On 27/01/14 17:18, Ian Campbell wrote:
> > On Fri, 2014-01-24 at 18:28 +0000, Andrew Cooper wrote:
> >> A physdev_op is a two argument hypercall, taking a command paramter and an
> >> optional pointer to a structure.
> >>
> >> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> >> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> > This hypercall is unused in minios and stubdoms I think? (Trying to
> > gauge how critical the error is).
> 
> Correct.  I suppose it is more of a "nice to fix" than "must fix" at
> this stage, although I was quite surprised that I needed to fix it.

Given that the function is just wrong and that it appears to be unused
in tree I think a simple compile test to confirm is sufficient to take
it into 4.4. Since that succeeded I have acked + applied.

Ian.

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

end of thread, other threads:[~2014-01-28 11:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 18:28 [PATCH] minios: Correct HYPERVISOR_physdev_op() Andrew Cooper
2014-01-24 18:44 ` Konrad Rzeszutek Wilk
2014-01-26 16:38 ` Samuel Thibault
2014-01-27 17:18 ` Ian Campbell
2014-01-27 17:20   ` Andrew Cooper
2014-01-28 11:47     ` Ian Campbell

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.