All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] s390/uv: fix for ultravisor query function
@ 2020-02-10 16:54 Christian Borntraeger
  2020-02-10 16:54 ` [PATCH 1/1] s390/uv: Fix handling of length extensions Christian Borntraeger
  2020-02-10 17:32 ` [PATCH 0/1] s390/uv: fix for ultravisor query function Cornelia Huck
  0 siblings, 2 replies; 8+ messages in thread
From: Christian Borntraeger @ 2020-02-10 16:54 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank
  Cc: KVM, Cornelia Huck, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik

As outlined by the architects the query command could actually return more
than the minimal 168 bytes.

I will carry this with the KVM host support for protected virtualization

Christian Borntraeger (1):
  s390/uv: Fix handling of length extensions

 arch/s390/boot/uv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.24.0

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

* [PATCH 1/1] s390/uv: Fix handling of length extensions
  2020-02-10 16:54 [PATCH 0/1] s390/uv: fix for ultravisor query function Christian Borntraeger
@ 2020-02-10 16:54 ` Christian Borntraeger
  2020-02-10 17:31   ` Cornelia Huck
  2020-02-11  8:11   ` Janosch Frank
  2020-02-10 17:32 ` [PATCH 0/1] s390/uv: fix for ultravisor query function Cornelia Huck
  1 sibling, 2 replies; 8+ messages in thread
From: Christian Borntraeger @ 2020-02-10 16:54 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank
  Cc: KVM, Cornelia Huck, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik

The query parameter block might contain additional information and can
be extended in the future. If the size of the block does not suffice we
get an error code of rc=0x100.  The buffer will contain all information
up to the specified size and the hypervisor/guest simply do not need the
additional information as they do not know about the new data.  That
means that we can (and must) accept rc=0x100 as success.

Cc: stable@vger.kernel.org
Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/boot/uv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
index af9e1cc93c68..c003593664cd 100644
--- a/arch/s390/boot/uv.c
+++ b/arch/s390/boot/uv.c
@@ -21,7 +21,7 @@ void uv_query_info(void)
 	if (!test_facility(158))
 		return;
 
-	if (uv_call(0, (uint64_t)&uvcb))
+	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)
 		return;
 
 	if (IS_ENABLED(CONFIG_KVM)) {
-- 
2.24.0

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

* Re: [PATCH 1/1] s390/uv: Fix handling of length extensions
  2020-02-10 16:54 ` [PATCH 1/1] s390/uv: Fix handling of length extensions Christian Borntraeger
@ 2020-02-10 17:31   ` Cornelia Huck
  2020-02-10 18:46     ` Christian Borntraeger
  2020-02-11  8:11   ` Janosch Frank
  1 sibling, 1 reply; 8+ messages in thread
From: Cornelia Huck @ 2020-02-10 17:31 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Janosch Frank, KVM, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik

On Mon, 10 Feb 2020 11:54:39 -0500
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> The query parameter block might contain additional information and can
> be extended in the future. If the size of the block does not suffice we
> get an error code of rc=0x100.  The buffer will contain all information
> up to the specified size and the hypervisor/guest simply do not need the
> additional information as they do not know about the new data.  That
> means that we can (and must) accept rc=0x100 as success.
> 
> Cc: stable@vger.kernel.org
> Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code")
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/boot/uv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
> index af9e1cc93c68..c003593664cd 100644
> --- a/arch/s390/boot/uv.c
> +++ b/arch/s390/boot/uv.c
> @@ -21,7 +21,7 @@ void uv_query_info(void)
>  	if (!test_facility(158))
>  		return;
>  
> -	if (uv_call(0, (uint64_t)&uvcb))
> +	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)

Add a comment like

/* rc==0x100 means that there is additional data we do not process */

to avoid headscratching in the future?

>  		return;
>  
>  	if (IS_ENABLED(CONFIG_KVM)) {

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [PATCH 0/1] s390/uv: fix for ultravisor query function
  2020-02-10 16:54 [PATCH 0/1] s390/uv: fix for ultravisor query function Christian Borntraeger
  2020-02-10 16:54 ` [PATCH 1/1] s390/uv: Fix handling of length extensions Christian Borntraeger
@ 2020-02-10 17:32 ` Cornelia Huck
  2020-02-10 17:35   ` Christian Borntraeger
  1 sibling, 1 reply; 8+ messages in thread
From: Cornelia Huck @ 2020-02-10 17:32 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Janosch Frank, KVM, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik

On Mon, 10 Feb 2020 11:54:38 -0500
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> As outlined by the architects the query command could actually return more
> than the minimal 168 bytes.
> 
> I will carry this with the KVM host support for protected virtualization

As this is cc:stable (and also relevant for the guest side), why not
merge it right now?

> 
> Christian Borntraeger (1):
>   s390/uv: Fix handling of length extensions
> 
>  arch/s390/boot/uv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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

* Re: [PATCH 0/1] s390/uv: fix for ultravisor query function
  2020-02-10 17:32 ` [PATCH 0/1] s390/uv: fix for ultravisor query function Cornelia Huck
@ 2020-02-10 17:35   ` Christian Borntraeger
  2020-02-10 18:57     ` Christian Borntraeger
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Borntraeger @ 2020-02-10 17:35 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Janosch Frank, KVM, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik



On 10.02.20 18:32, Cornelia Huck wrote:
> On Mon, 10 Feb 2020 11:54:38 -0500
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> As outlined by the architects the query command could actually return more
>> than the minimal 168 bytes.
>>
>> I will carry this with the KVM host support for protected virtualization
> 
> As this is cc:stable (and also relevant for the guest side), why not
> merge it right now?
> 
Agreed. Will do.

>>
>> Christian Borntraeger (1):
>>   s390/uv: Fix handling of length extensions
>>
>>  arch/s390/boot/uv.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
> 

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

* Re: [PATCH 1/1] s390/uv: Fix handling of length extensions
  2020-02-10 17:31   ` Cornelia Huck
@ 2020-02-10 18:46     ` Christian Borntraeger
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Borntraeger @ 2020-02-10 18:46 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Janosch Frank, KVM, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik



On 10.02.20 18:31, Cornelia Huck wrote:
> On Mon, 10 Feb 2020 11:54:39 -0500
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> The query parameter block might contain additional information and can
>> be extended in the future. If the size of the block does not suffice we
>> get an error code of rc=0x100.  The buffer will contain all information
>> up to the specified size and the hypervisor/guest simply do not need the
>> additional information as they do not know about the new data.  That
>> means that we can (and must) accept rc=0x100 as success.
>>
>> Cc: stable@vger.kernel.org
>> Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code")
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>>  arch/s390/boot/uv.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
>> index af9e1cc93c68..c003593664cd 100644
>> --- a/arch/s390/boot/uv.c
>> +++ b/arch/s390/boot/uv.c
>> @@ -21,7 +21,7 @@ void uv_query_info(void)
>>  	if (!test_facility(158))
>>  		return;
>>  
>> -	if (uv_call(0, (uint64_t)&uvcb))
>> +	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)
> 
> Add a comment like
> 
> /* rc==0x100 means that there is additional data we do not process */

ack.

> 
> to avoid headscratching in the future?
> 
>>  		return;
>>  
>>  	if (IS_ENABLED(CONFIG_KVM)) {
> 
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
> 

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

* Re: [PATCH 0/1] s390/uv: fix for ultravisor query function
  2020-02-10 17:35   ` Christian Borntraeger
@ 2020-02-10 18:57     ` Christian Borntraeger
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Borntraeger @ 2020-02-10 18:57 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Janosch Frank, KVM, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik



On 10.02.20 18:35, Christian Borntraeger wrote:
> 
> 
> On 10.02.20 18:32, Cornelia Huck wrote:
>> On Mon, 10 Feb 2020 11:54:38 -0500
>> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
>>
>>> As outlined by the architects the query command could actually return more
>>> than the minimal 168 bytes.
>>>
>>> I will carry this with the KVM host support for protected virtualization
>>
>> As this is cc:stable (and also relevant for the guest side), why not
>> merge it right now?
>>
> Agreed. Will do.

Pushed to the internal tree. If nobody comes up with a reason not to, Vasily
will have this in his next pull request for Linux.

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

* Re: [PATCH 1/1] s390/uv: Fix handling of length extensions
  2020-02-10 16:54 ` [PATCH 1/1] s390/uv: Fix handling of length extensions Christian Borntraeger
  2020-02-10 17:31   ` Cornelia Huck
@ 2020-02-11  8:11   ` Janosch Frank
  1 sibling, 0 replies; 8+ messages in thread
From: Janosch Frank @ 2020-02-11  8:11 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank
  Cc: KVM, Cornelia Huck, David Hildenbrand, Thomas Huth, linux-s390,
	Vasily Gorbik


[-- Attachment #1.1: Type: text/plain, Size: 1288 bytes --]

On 2/10/20 5:54 PM, Christian Borntraeger wrote:
> The query parameter block might contain additional information and can
> be extended in the future. If the size of the block does not suffice we
> get an error code of rc=0x100.  The buffer will contain all information
> up to the specified size and the hypervisor/guest simply do not need the
> additional information as they do not know about the new data.  That
                                                                ^

> means that we can (and must) accept rc=0x100 as success.

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

> 
> Cc: stable@vger.kernel.org
> Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code")
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/boot/uv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
> index af9e1cc93c68..c003593664cd 100644
> --- a/arch/s390/boot/uv.c
> +++ b/arch/s390/boot/uv.c
> @@ -21,7 +21,7 @@ void uv_query_info(void)
>  	if (!test_facility(158))
>  		return;
> 
> -	if (uv_call(0, (uint64_t)&uvcb))
> +	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)
>  		return;
> 
>  	if (IS_ENABLED(CONFIG_KVM)) {
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-02-11  8:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 16:54 [PATCH 0/1] s390/uv: fix for ultravisor query function Christian Borntraeger
2020-02-10 16:54 ` [PATCH 1/1] s390/uv: Fix handling of length extensions Christian Borntraeger
2020-02-10 17:31   ` Cornelia Huck
2020-02-10 18:46     ` Christian Borntraeger
2020-02-11  8:11   ` Janosch Frank
2020-02-10 17:32 ` [PATCH 0/1] s390/uv: fix for ultravisor query function Cornelia Huck
2020-02-10 17:35   ` Christian Borntraeger
2020-02-10 18:57     ` Christian Borntraeger

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.