All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>,
	KVM <kvm@vger.kernel.org>, David Hildenbrand <david@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	linux-s390 <linux-s390@vger.kernel.org>,
	Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH 1/1] s390/uv: Fix handling of length extensions
Date: Mon, 10 Feb 2020 18:31:52 +0100	[thread overview]
Message-ID: <20200210183152.40bfae24.cohuck@redhat.com> (raw)
In-Reply-To: <20200210165439.3767-2-borntraeger@de.ibm.com>

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>

  reply	other threads:[~2020-02-10 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200210183152.40bfae24.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.vnet.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.