Skip to contentSkip to conversation

s390x: epsw: fix report_pop_prefix() when running under non-QEMU

PATCH Superseded Nico Boehr 3 participants 7 messages Apr 12, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nico Boehr

author
#0 lore raw

PATCH 1/3 s390x: epsw: fix report_pop_prefix() when running under non-QEMU

When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check.

---
 s390x/epsw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
s390x/epsw.c +2 -2
index 5b73f4b3db6c..d8090d95a486 100644
@@ -97,13 +97,13 @@ static void test_epsw(void)
 
 int main(int argc, char **argv)
 {
+	report_prefix_push("epsw");
+
 	if (!host_is_kvm() && !host_is_tcg()) {
 		report_skip("Not running under QEMU");
 		goto done;
 	}
 
-	report_prefix_push("epsw");
-
 	test_epsw();
 
 done:
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 2/3 s390x: tprot: use system include for mmu.h

mmu.h should come from the system includes

---
 s390x/tprot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/tprot.c +1 -1
index 460a0db7ffcf..760e7ecdf914 100644
@@ -12,7 +12,7 @@
 #include <bitops.h>
 #include <asm/pgtable.h>
 #include <asm/interrupt.h>
-#include "mmu.h"
+#include <mmu.h>
 #include <vmalloc.h>
 #include <sclp.h>
 
Signature · 1 line
2.31.1
Reviewed-by on v1 2/3
#2 lore raw

Re: [kvm-unit-tests PATCH v1 2/3] s390x: tprot: use system include for mmu.h

Quoted 1 line · Nico Boehr

mmu.h should come from the system includes

Maybe: s/system/lib/

Quoted 11 lines
---
  s390x/tprot.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
s390x/tprot.c +0 -0
index 460a0db7ffcf..760e7ecdf914 100644

s390x/tprot.c line 18

Quoted 8 lines
s390x/tprot.c +1 -1
@@ -12,7 +12,7 @@
  #include <bitops.h>
  #include <asm/pgtable.h>
  #include <asm/interrupt.h>
-#include "mmu.h"
+#include <mmu.h>
  #include <vmalloc.h>
  #include <sclp.h>
 
author
#3 lore raw

PATCH v2 2/3 s390x: tprot: use lib include for mmu.h

mmu.h should come from the library includes

---
 s390x/tprot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/tprot.c +1 -1
index 460a0db7ffcf..760e7ecdf914 100644
@@ -12,7 +12,7 @@
 #include <bitops.h>
 #include <asm/pgtable.h>
 #include <asm/interrupt.h>
-#include "mmu.h"
+#include <mmu.h>
 #include <vmalloc.h>
 #include <sclp.h>
 
Signature · 1 line
2.31.1
Reviewed-by on v2 2/3
#4 lore raw

Re: [kvm-unit-tests PATCH v2 2/3] s390x: tprot: use lib include for mmu.h

Quoted 4 lines · Nico Boehr

mmu.h should come from the library includes

Quoted 17 lines
---
  s390x/tprot.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
s390x/tprot.c +1 -1
index 460a0db7ffcf..760e7ecdf914 100644
@@ -12,7 +12,7 @@
  #include <bitops.h>
  #include <asm/pgtable.h>
  #include <asm/interrupt.h>
-#include "mmu.h"
+#include <mmu.h>
  #include <vmalloc.h>
  #include <sclp.h>
 
Reviewed-by on v1 1/3
#5 lore raw
In reply to Nico Boehr
Quoted 18 lines · Nico Boehr

When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check.

---
  s390x/epsw.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
s390x/epsw.c +2 -0
index 5b73f4b3db6c..d8090d95a486 100644
@@ -97,13 +97,13 @@ static void test_epsw(void)
 
  int main(int argc, char **argv)
  {
+	report_prefix_push("epsw");
+

s390x/epsw.c static void test_epsw(void) · line 109

Quoted 10 lines
s390x/epsw.c +0 -2
  	if (!host_is_kvm() && !host_is_tcg()) {
  		report_skip("Not running under QEMU");
  		goto done;
  	}
 
-	report_prefix_push("epsw");
-
  	test_epsw();
 
  done:
Reviewed-by on v1 1/3
#6 lore raw
In reply to Nico Boehr
Quoted 4 lines · Nico Boehr

When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check.

Quoted 24 lines
---
  s390x/epsw.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
s390x/epsw.c +2 -2
index 5b73f4b3db6c..d8090d95a486 100644
@@ -97,13 +97,13 @@ static void test_epsw(void)
 
  int main(int argc, char **argv)
  {
+	report_prefix_push("epsw");
+
  	if (!host_is_kvm() && !host_is_tcg()) {
  		report_skip("Not running under QEMU");
  		goto done;
  	}
 
-	report_prefix_push("epsw");
-
  	test_epsw();
 
  done: