diff mbox series

[kvm-unit-tests,v2,6/9] s390x: uv-host: Fix create guest variable storage prefix check

Message ID 20230324121724.1627-7-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: uv-host: Fixups and extensions part 1 | expand

Commit Message

Janosch Frank March 24, 2023, 12:17 p.m. UTC
We want more than one cpu and the rc is 10B, not 10E.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
---
 s390x/uv-host.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/s390x/uv-host.c b/s390x/uv-host.c
index 13e49ed3..f9a55acf 100644
--- a/s390x/uv-host.c
+++ b/s390x/uv-host.c
@@ -434,11 +434,15 @@  static void test_config_create(void)
 	       "base storage origin contains lowcore");
 	uvcb_cgc.conf_base_stor_origin = tmp;
 
-	if (smp_query_num_cpus() == 1) {
+	/*
+	 * Let's not make it too easy and use a second cpu to set a
+	 * non-zero prefix.
+	 */
+	if (smp_query_num_cpus() > 1) {
 		sigp_retry(1, SIGP_SET_PREFIX,
 			   uvcb_cgc.conf_var_stor_origin + PAGE_SIZE, NULL);
 		rc = uv_call(0, (uint64_t)&uvcb_cgc);
-		report(uvcb_cgc.header.rc == 0x10e && rc == 1 &&
+		report(uvcb_cgc.header.rc == 0x10b && rc == 1 &&
 		       !uvcb_cgc.guest_handle, "variable storage area contains lowcore");
 		sigp_retry(1, SIGP_SET_PREFIX, 0x0, NULL);
 	}