Skip to contentSkip to conversation

target/s390x: use "qemu" cpu model in user mode

PATCH In review David Hildenbrand 5 participants 6 messages Jan 30, 2017 – Feb 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/s390x: use "qemu" cpu model in user mode

"any" does not exist, therefore resulting in a misleading error message.

---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)
linux-user/main.c +2 -0
index 3004958..e588f58 100644
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Hildenbrand

"any" does not exist, therefore resulting in a misleading error message.

I think we support more instructions in user space than in kernel space, but for now this change is good as it definitely unbreaks user emulation.

Alex

Quoted 17 lines
---
  linux-user/main.c | 2 ++
  1 file changed, 2 insertions(+)
linux-user/main.c +2 -0
index 3004958..e588f58 100644
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
  # endif
  #elif defined TARGET_SH4
          cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
  #else
          cpu_model = "any";
  #endif
Reviewed-by on v1 1/1
#2 lore raw
In reply to David Hildenbrand

Am 30.01.2017 um 15:50 schrieb David Hildenbrand:

Quoted 13 lines

"any" does not exist, therefore resulting in a misleading error message.

---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)
linux-user/main.c +0 -0
index 3004958..e588f58 100644

linux-user/main.c int main(int argc, char **argv, char **envp) · line 4329

Quoted 8 lines
linux-user/main.c +2 -0
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif

Thanks.

This fix is also needed for Debian's QEMU user emulation.

#3 lore raw
Quoted 26 lines · Stefan Weil

Am 30.01.2017 um 15:50 schrieb David Hildenbrand:

Quoted 13 lines

"any" does not exist, therefore resulting in a misleading error message.

---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)
linux-user/main.c +0 -0
index 3004958..e588f58 100644

linux-user/main.c int main(int argc, char **argv, char **envp) · line 4329

Quoted 8 lines
linux-user/main.c +2 -0
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif

Thanks.

Quoted 3 lines

This fix is also needed for Debian's QEMU user emulation.

Does it merit a cc: qemu-stable ?

thanks
-- PMM

#4 lore raw

Am 30.01.2017 um 16:11 schrieb Peter Maydell:

Quoted 26 lines · Stefan Weil
Quoted 25 lines

Am 30.01.2017 um 15:50 schrieb David Hildenbrand:

Quoted 13 lines

"any" does not exist, therefore resulting in a misleading error message.

---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)
linux-user/main.c +0 -0
index 3004958..e588f58 100644

linux-user/main.c int main(int argc, char **argv, char **envp) · line 4329

Quoted 8 lines
linux-user/main.c +2 -0
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif

Thanks.

Quoted 7 lines
Quoted 3 lines

This fix is also needed for Debian's QEMU user emulation.

Does it merit a cc: qemu-stable ?

thanks
-- PMM

Yes, of course. Thanks for the reminder - I added that list now as cc.

#5 lore raw
Quoted 29 lines · Stefan Weil

Am 30.01.2017 um 16:11 schrieb Peter Maydell:

Quoted 28 lines · Stefan Weil
Quoted 27 lines

Am 30.01.2017 um 15:50 schrieb David Hildenbrand:

Quoted 13 lines

"any" does not exist, therefore resulting in a misleading error message.

---
 linux-user/main.c | 2 ++
 1 file changed, 2 insertions(+)
linux-user/main.c +0 -0
index 3004958..e588f58 100644

linux-user/main.c int main(int argc, char **argv, char **envp) · line 4329

Quoted 8 lines
linux-user/main.c +2 -0
@@ -4322,6 +4322,8 @@ int main(int argc, char **argv, char **envp)
 # endif
 #elif defined TARGET_SH4
         cpu_model = TYPE_SH7785_CPU;
+#elif defined TARGET_S390X
+        cpu_model = "qemu";
 #else
         cpu_model = "any";
 #endif

Thanks.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

This fix is also needed for Debian's QEMU user emulation.

Does it merit a cc: qemu-stable ?

thanks
-- PMM

Yes, of course. Thanks for the reminder - I added that list now as cc.

Added to the kvm/s390 tree (since this tree introduced the regression)