Blob Blame History Raw
From: Vasily Gorbik <gor@linux.ibm.com>
Date: Wed, 23 Oct 2019 13:56:36 +0200
Subject: s390: kernel/uv: handle length extension properly
Git-commit: ecdc5d842bb3c166c3d549e52ba91a3955b257f2 (partial)
Patch-mainline: v5.7-rc1
References: bsc#1178940 LTC#189323

The initial size of the UV query function is too small for some
firmware versions. Increase the query buffer to avoid rc 0x100. This
brings the guest support in line with the final upstream version of
the query call of secure execution.

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
[borntraeger@de.ibm.com: patch merging, splitting, fixing]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[ ptesarik: Kernel protected VMs support is not actually added, only
  the UV info data structure is enlarged, so the kernel does not fail
  to boot with certain versions of the firmware. ]
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
 arch/s390/include/asm/uv.h |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

--- a/arch/s390/include/asm/uv.h
+++ b/arch/s390/include/asm/uv.h
@@ -44,7 +44,19 @@ struct uv_cb_qui {
 	struct uv_cb_header header;
 	u64 reserved08;
 	u64 inst_calls_list[4];
-	u64 reserved30[15];
+	u64 reserved30[2];
+	u64 uv_base_stor_len;
+	u64 reserved48;
+	u64 conf_base_phys_stor_len;
+	u64 conf_base_virt_stor_len;
+	u64 conf_virt_var_stor_len;
+	u64 cpu_stor_len;
+	u32 reserved70[3];
+	u32 max_num_sec_conf;
+	u64 max_guest_stor_addr;
+	u8  reserved88[158 - 136];
+	u16 max_guest_cpus;
+	u8  reserveda0[200 - 160];
 } __packed __aligned(8);
 
 struct uv_cb_share {