qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 01/31] target/alpha: Remove 'ev67' CPU class


From: Richard Henderson
Subject: Re: [PATCH v5 01/31] target/alpha: Remove 'ev67' CPU class
Date: Tue, 14 Nov 2023 16:22:24 -0800
User-agent: Mozilla Thunderbird

On 11/14/23 15:55, Gavin Shan wrote:
'ev67' CPU class will be returned to match everything, which makes
no sense as mentioned in the comments. Remove the logic to fall
back to 'ev67' CPU class to match everything.

Signed-off-by: Gavin Shan <gshan@redhat.com>
---
  target/alpha/cpu.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

The subject is wrong -- ev67 cpu class is still present.
Better as

  target/alpha: Remove fallback to ev67 cpu class

with that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 39cf841b3e..91fe8ae095 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -141,11 +141,8 @@ static ObjectClass *alpha_cpu_class_by_name(const char 
*cpu_model)
      typename = g_strdup_printf(ALPHA_CPU_TYPE_NAME("%s"), cpu_model);
      oc = object_class_by_name(typename);
      g_free(typename);
-
-    /* TODO: remove match everything nonsense */
-    if (!oc || object_class_is_abstract(oc)) {
-        /* Default to ev67; no reason not to emulate insns by default. */
-        oc = object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67"));
+    if (!oc || !object_class_dynamic_cast(oc, TYPE_ALPHA_CPU)) {
+        return NULL;
      }
return oc;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]