* [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs
@ 2024-08-14 13:39 Philippe Mathieu-Daudé
2024-08-14 13:39 ` [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-14 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su,
Philippe Mathieu-Daudé
Improve CPU type selection:
- Remove R5900
- Cover Octeon / R2 / Loongson*
Philippe Mathieu-Daudé (4):
linux-user/mips: Do not try to use removed R5900 CPU
linux-user/mips: Select Octeon68XX CPU for Octeon binaries
linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
linux-user/mips: Select Loongson CPU for Loongson binaries
linux-user/mips/target_elf.h | 3 ---
linux-user/mips64/target_elf.h | 24 ++++++++++++++++++++----
2 files changed, 20 insertions(+), 7 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
@ 2024-08-14 13:39 ` Philippe Mathieu-Daudé
2024-08-14 22:15 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-14 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su,
Philippe Mathieu-Daudé
R5900 emulation was removed in commit 823f2897bd.
Remove it from ELF parsing in order to avoid:
$ qemu-mipsn32 ./test5900
qemu-mipsn32: unable to find CPU model 'R5900'
This reverts commit 4d9e5a0eb7df6e98ac6cf5e16029f35dd05b9537.
Fixes: 823f2897bd ("target/mips: Disable R5900 support")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/mips/target_elf.h | 3 ---
linux-user/mips64/target_elf.h | 3 ---
2 files changed, 6 deletions(-)
diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h
index b965e86b2b..71a32315a8 100644
--- a/linux-user/mips/target_elf.h
+++ b/linux-user/mips/target_elf.h
@@ -12,9 +12,6 @@ static inline const char *cpu_get_model(uint32_t eflags)
if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) {
return "mips32r6-generic";
}
- if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
- return "R5900";
- }
if (eflags & EF_MIPS_NAN2008) {
return "P5600";
}
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index 5f2f2df29f..ec55d8542a 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -12,9 +12,6 @@ static inline const char *cpu_get_model(uint32_t eflags)
if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
return "I6400";
}
- if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
- return "R5900";
- }
return "5KEf";
}
#endif
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
2024-08-14 13:39 ` [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU Philippe Mathieu-Daudé
@ 2024-08-14 13:39 ` Philippe Mathieu-Daudé
2024-08-14 22:17 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-14 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su,
Philippe Mathieu-Daudé, Pavel Dovgalyuk,
Johnathan Hữu Trí
The Octeon68XX CPU is available since commit 9a6046a655
("target/mips: introduce Cavium Octeon CPU model").
Cc: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1722
Reported-by: Johnathan Hữu Trí <nhtri2003@gmail.com>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/mips64/target_elf.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index ec55d8542a..ce6fb6541e 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -9,6 +9,14 @@
#define MIPS64_TARGET_ELF_H
static inline const char *cpu_get_model(uint32_t eflags)
{
+ switch (eflags & EF_MIPS_MACH) {
+ case EF_MIPS_MACH_OCTEON:
+ case EF_MIPS_MACH_OCTEON2:
+ case EF_MIPS_MACH_OCTEON3:
+ return "Octeon68XX";
+ default:
+ break;
+ }
if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
return "I6400";
}
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
2024-08-14 13:39 ` [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU Philippe Mathieu-Daudé
2024-08-14 13:39 ` [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries Philippe Mathieu-Daudé
@ 2024-08-14 13:39 ` Philippe Mathieu-Daudé
2024-08-14 22:19 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries Philippe Mathieu-Daudé
2024-08-15 9:22 ` [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-14 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su,
Philippe Mathieu-Daudé
Cc: YunQiang Su <syq@debian.org>
Reported-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/mips64/target_elf.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index ce6fb6541e..a3a8b2e385 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -17,8 +17,13 @@ static inline const char *cpu_get_model(uint32_t eflags)
default:
break;
}
- if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
+ switch (eflags & EF_MIPS_ARCH) {
+ case EF_MIPS_ARCH_64R6:
return "I6400";
+ case EF_MIPS_ARCH_64R2:
+ return "MIPS64R2-generic";
+ default:
+ break;
}
return "5KEf";
}
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2024-08-14 13:39 ` [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries Philippe Mathieu-Daudé
@ 2024-08-14 13:39 ` Philippe Mathieu-Daudé
2024-08-14 22:19 ` Richard Henderson
2024-08-15 9:22 ` [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-14 13:39 UTC (permalink / raw)
To: qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su,
Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/mips64/target_elf.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index a3a8b2e385..502af9d278 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -14,6 +14,12 @@ static inline const char *cpu_get_model(uint32_t eflags)
case EF_MIPS_MACH_OCTEON2:
case EF_MIPS_MACH_OCTEON3:
return "Octeon68XX";
+ case EF_MIPS_MACH_LS2E:
+ return "Loongson-2E";
+ case EF_MIPS_MACH_LS2F:
+ return "Loongson-2F";
+ case EF_MIPS_MACH_LS3A:
+ return "Loongson-3A1000";
default:
break;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU
2024-08-14 13:39 ` [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU Philippe Mathieu-Daudé
@ 2024-08-14 22:15 ` Richard Henderson
0 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2024-08-14 22:15 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, YunQiang Su
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> R5900 emulation was removed in commit 823f2897bd.
> Remove it from ELF parsing in order to avoid:
>
> $ qemu-mipsn32 ./test5900
> qemu-mipsn32: unable to find CPU model 'R5900'
>
> This reverts commit 4d9e5a0eb7df6e98ac6cf5e16029f35dd05b9537.
>
> Fixes: 823f2897bd ("target/mips: Disable R5900 support")
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> linux-user/mips/target_elf.h | 3 ---
> linux-user/mips64/target_elf.h | 3 ---
> 2 files changed, 6 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries
2024-08-14 13:39 ` [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries Philippe Mathieu-Daudé
@ 2024-08-14 22:17 ` Richard Henderson
0 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2024-08-14 22:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, YunQiang Su, Pavel Dovgalyuk,
Johnathan Hữu Trí
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> The Octeon68XX CPU is available since commit 9a6046a655
> ("target/mips: introduce Cavium Octeon CPU model").
>
> Cc: Pavel Dovgalyuk<Pavel.Dovgalyuk@ispras.ru>
> Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1722
> Reported-by: Johnathan Hữu Trí<nhtri2003@gmail.com>
> Suggested-by: Richard Henderson<richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> linux-user/mips64/target_elf.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
2024-08-14 13:39 ` [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries Philippe Mathieu-Daudé
@ 2024-08-14 22:19 ` Richard Henderson
0 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2024-08-14 22:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, YunQiang Su
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> Cc: YunQiang Su<syq@debian.org>
> Reported-by: Jiaxun Yang<jiaxun.yang@flygoat.com>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> linux-user/mips64/target_elf.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries
2024-08-14 13:39 ` [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries Philippe Mathieu-Daudé
@ 2024-08-14 22:19 ` Richard Henderson
0 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2024-08-14 22:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Jiaxun Yang, Laurent Vivier, YunQiang Su
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> linux-user/mips64/target_elf.h | 6 ++++++
> 1 file changed, 6 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
And yes, this might as well go in with the others for 9.1.
r~
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2024-08-14 13:39 ` [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries Philippe Mathieu-Daudé
@ 2024-08-15 9:22 ` Philippe Mathieu-Daudé
4 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-15 9:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Jiaxun Yang, Laurent Vivier, Richard Henderson, YunQiang Su
On 14/8/24 15:39, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (4):
> linux-user/mips: Do not try to use removed R5900 CPU
> linux-user/mips: Select Octeon68XX CPU for Octeon binaries
> linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
> linux-user/mips: Select Loongson CPU for Loongson binaries
Series queued.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-08-15 9:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 13:39 [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
2024-08-14 13:39 ` [PATCH-for-9.1 1/4] linux-user/mips: Do not try to use removed R5900 CPU Philippe Mathieu-Daudé
2024-08-14 22:15 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries Philippe Mathieu-Daudé
2024-08-14 22:17 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries Philippe Mathieu-Daudé
2024-08-14 22:19 ` Richard Henderson
2024-08-14 13:39 ` [PATCH-for-9.1? 4/4] linux-user/mips: Select Loongson CPU for Loongson binaries Philippe Mathieu-Daudé
2024-08-14 22:19 ` Richard Henderson
2024-08-15 9:22 ` [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).