linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: s390: improve documentation for S390_MEM_OP
@ 2019-08-29 12:47 Cornelia Huck
  2019-08-29 12:50 ` Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cornelia Huck @ 2019-08-29 12:47 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank, kvm
  Cc: David Hildenbrand, Heiko Carstens, Vasily Gorbik, Thomas Huth,
	linux-s390, linux-kernel, Cornelia Huck

Explicitly specify the valid ranges for size and ar, and reword
buf requirements a bit.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
supposed to go on top of "KVM: s390: Test for bad access register and
size at the start of S390_MEM_OP" (<20190829122517.31042-1-thuth@redhat.com>)
---
 Documentation/virt/kvm/api.txt | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/virt/kvm/api.txt b/Documentation/virt/kvm/api.txt
index 2d067767b617..76c9d6fdbfdb 100644
--- a/Documentation/virt/kvm/api.txt
+++ b/Documentation/virt/kvm/api.txt
@@ -3079,12 +3079,14 @@ This exception is also raised directly at the corresponding VCPU if the
 flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set in the "flags" field.
 
 The start address of the memory region has to be specified in the "gaddr"
-field, and the length of the region in the "size" field. "buf" is the buffer
-supplied by the userspace application where the read data should be written
-to for KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written
-is stored for a KVM_S390_MEMOP_LOGICAL_WRITE. "buf" is unused and can be NULL
-when KVM_S390_MEMOP_F_CHECK_ONLY is specified. "ar" designates the access
-register number to be used.
+field, and the length of the region in the "size" field (which must not
+be 0). The maximum value for "size" can be obtained by checking the
+KVM_CAP_S390_MEM_OP capability. "buf" is the buffer supplied by the
+userspace application where the read data should be written to for
+KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written is
+stored for a KVM_S390_MEMOP_LOGICAL_WRITE. When KVM_S390_MEMOP_F_CHECK_ONLY
+is specified, "buf" is unused and can be NULL. "ar" designates the access
+register number to be used; the valid range is 0..15.
 
 The "reserved" field is meant for future extensions. It is not used by
 KVM with the currently defined set of flags.
-- 
2.20.1


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

* Re: [PATCH] KVM: s390: improve documentation for S390_MEM_OP
  2019-08-29 12:47 [PATCH] KVM: s390: improve documentation for S390_MEM_OP Cornelia Huck
@ 2019-08-29 12:50 ` Thomas Huth
  2019-08-29 13:38 ` Christian Borntraeger
  2019-08-29 13:58 ` David Hildenbrand
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2019-08-29 12:50 UTC (permalink / raw)
  To: Cornelia Huck, Christian Borntraeger, Janosch Frank, kvm
  Cc: David Hildenbrand, Heiko Carstens, Vasily Gorbik, linux-s390,
	linux-kernel

On 29/08/2019 14.47, Cornelia Huck wrote:
> Explicitly specify the valid ranges for size and ar, and reword
> buf requirements a bit.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> supposed to go on top of "KVM: s390: Test for bad access register and
> size at the start of S390_MEM_OP" (<20190829122517.31042-1-thuth@redhat.com>)
> ---
>  Documentation/virt/kvm/api.txt | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/api.txt b/Documentation/virt/kvm/api.txt
> index 2d067767b617..76c9d6fdbfdb 100644
> --- a/Documentation/virt/kvm/api.txt
> +++ b/Documentation/virt/kvm/api.txt
> @@ -3079,12 +3079,14 @@ This exception is also raised directly at the corresponding VCPU if the
>  flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set in the "flags" field.
>  
>  The start address of the memory region has to be specified in the "gaddr"
> -field, and the length of the region in the "size" field. "buf" is the buffer
> -supplied by the userspace application where the read data should be written
> -to for KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written
> -is stored for a KVM_S390_MEMOP_LOGICAL_WRITE. "buf" is unused and can be NULL
> -when KVM_S390_MEMOP_F_CHECK_ONLY is specified. "ar" designates the access
> -register number to be used.
> +field, and the length of the region in the "size" field (which must not
> +be 0). The maximum value for "size" can be obtained by checking the
> +KVM_CAP_S390_MEM_OP capability. "buf" is the buffer supplied by the
> +userspace application where the read data should be written to for
> +KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written is
> +stored for a KVM_S390_MEMOP_LOGICAL_WRITE. When KVM_S390_MEMOP_F_CHECK_ONLY
> +is specified, "buf" is unused and can be NULL. "ar" designates the access
> +register number to be used; the valid range is 0..15.
>  
>  The "reserved" field is meant for future extensions. It is not used by
>  KVM with the currently defined set of flags.
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [PATCH] KVM: s390: improve documentation for S390_MEM_OP
  2019-08-29 12:47 [PATCH] KVM: s390: improve documentation for S390_MEM_OP Cornelia Huck
  2019-08-29 12:50 ` Thomas Huth
@ 2019-08-29 13:38 ` Christian Borntraeger
  2019-08-29 13:58 ` David Hildenbrand
  2 siblings, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2019-08-29 13:38 UTC (permalink / raw)
  To: Cornelia Huck, Janosch Frank, kvm
  Cc: David Hildenbrand, Heiko Carstens, Vasily Gorbik, Thomas Huth,
	linux-s390, linux-kernel

Thanks applied. 

On 29.08.19 14:47, Cornelia Huck wrote:
> Explicitly specify the valid ranges for size and ar, and reword
> buf requirements a bit.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> supposed to go on top of "KVM: s390: Test for bad access register and
> size at the start of S390_MEM_OP" (<20190829122517.31042-1-thuth@redhat.com>)
> ---
>  Documentation/virt/kvm/api.txt | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/api.txt b/Documentation/virt/kvm/api.txt
> index 2d067767b617..76c9d6fdbfdb 100644
> --- a/Documentation/virt/kvm/api.txt
> +++ b/Documentation/virt/kvm/api.txt
> @@ -3079,12 +3079,14 @@ This exception is also raised directly at the corresponding VCPU if the
>  flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set in the "flags" field.
>  
>  The start address of the memory region has to be specified in the "gaddr"
> -field, and the length of the region in the "size" field. "buf" is the buffer
> -supplied by the userspace application where the read data should be written
> -to for KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written
> -is stored for a KVM_S390_MEMOP_LOGICAL_WRITE. "buf" is unused and can be NULL
> -when KVM_S390_MEMOP_F_CHECK_ONLY is specified. "ar" designates the access
> -register number to be used.
> +field, and the length of the region in the "size" field (which must not
> +be 0). The maximum value for "size" can be obtained by checking the
> +KVM_CAP_S390_MEM_OP capability. "buf" is the buffer supplied by the
> +userspace application where the read data should be written to for
> +KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written is
> +stored for a KVM_S390_MEMOP_LOGICAL_WRITE. When KVM_S390_MEMOP_F_CHECK_ONLY
> +is specified, "buf" is unused and can be NULL. "ar" designates the access
> +register number to be used; the valid range is 0..15.
>  
>  The "reserved" field is meant for future extensions. It is not used by
>  KVM with the currently defined set of flags.
> 


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

* Re: [PATCH] KVM: s390: improve documentation for S390_MEM_OP
  2019-08-29 12:47 [PATCH] KVM: s390: improve documentation for S390_MEM_OP Cornelia Huck
  2019-08-29 12:50 ` Thomas Huth
  2019-08-29 13:38 ` Christian Borntraeger
@ 2019-08-29 13:58 ` David Hildenbrand
  2 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2019-08-29 13:58 UTC (permalink / raw)
  To: Cornelia Huck, Christian Borntraeger, Janosch Frank, kvm
  Cc: Heiko Carstens, Vasily Gorbik, Thomas Huth, linux-s390, linux-kernel

On 29.08.19 14:47, Cornelia Huck wrote:
> Explicitly specify the valid ranges for size and ar, and reword
> buf requirements a bit.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> supposed to go on top of "KVM: s390: Test for bad access register and
> size at the start of S390_MEM_OP" (<20190829122517.31042-1-thuth@redhat.com>)
> ---
>  Documentation/virt/kvm/api.txt | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/api.txt b/Documentation/virt/kvm/api.txt
> index 2d067767b617..76c9d6fdbfdb 100644
> --- a/Documentation/virt/kvm/api.txt
> +++ b/Documentation/virt/kvm/api.txt
> @@ -3079,12 +3079,14 @@ This exception is also raised directly at the corresponding VCPU if the
>  flag KVM_S390_MEMOP_F_INJECT_EXCEPTION is set in the "flags" field.
>  
>  The start address of the memory region has to be specified in the "gaddr"
> -field, and the length of the region in the "size" field. "buf" is the buffer
> -supplied by the userspace application where the read data should be written
> -to for KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written
> -is stored for a KVM_S390_MEMOP_LOGICAL_WRITE. "buf" is unused and can be NULL
> -when KVM_S390_MEMOP_F_CHECK_ONLY is specified. "ar" designates the access
> -register number to be used.
> +field, and the length of the region in the "size" field (which must not
> +be 0). The maximum value for "size" can be obtained by checking the
> +KVM_CAP_S390_MEM_OP capability. "buf" is the buffer supplied by the
> +userspace application where the read data should be written to for
> +KVM_S390_MEMOP_LOGICAL_READ, or where the data that should be written is
> +stored for a KVM_S390_MEMOP_LOGICAL_WRITE. When KVM_S390_MEMOP_F_CHECK_ONLY
> +is specified, "buf" is unused and can be NULL. "ar" designates the access
> +register number to be used; the valid range is 0..15.
>  
>  The "reserved" field is meant for future extensions. It is not used by
>  KVM with the currently defined set of flags.
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb

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

end of thread, other threads:[~2019-08-29 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 12:47 [PATCH] KVM: s390: improve documentation for S390_MEM_OP Cornelia Huck
2019-08-29 12:50 ` Thomas Huth
2019-08-29 13:38 ` Christian Borntraeger
2019-08-29 13:58 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).