summaryrefslogtreecommitdiffstats
path: root/arch/s390/boot
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2020-02-10 11:27:37 -0500
committerVasily Gorbik <gor@linux.ibm.com>2020-02-11 20:15:42 +0100
commit27dc0700c3be7c681cea03c5230b93d02f623492 (patch)
tree58fa694de310f5e7a4eded85d3798b796e51beb2 /arch/s390/boot
parent2c25b3f68e9236365d2beaa032cc6d2a160df084 (diff)
downloadlinux-27dc0700c3be7c681cea03c5230b93d02f623492.tar.gz
linux-27dc0700c3be7c681cea03c5230b93d02f623492.tar.bz2
linux-27dc0700c3be7c681cea03c5230b93d02f623492.zip
s390/uv: Fix handling of length extensions
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 Reviewed-by: Cornelia Huck <cohuck@redhat.com> Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code") Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r--arch/s390/boot/uv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
index ed007f4a6444..3f501159ee9f 100644
--- a/arch/s390/boot/uv.c
+++ b/arch/s390/boot/uv.c
@@ -15,7 +15,8 @@ void uv_query_info(void)
if (!test_facility(158))
return;
- if (uv_call(0, (uint64_t)&uvcb))
+ /* rc==0x100 means that there is additional data we do not process */
+ if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)
return;
if (test_bit_inv(BIT_UVC_CMD_SET_SHARED_ACCESS, (unsigned long *)uvcb.inst_calls_list) &&