qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/28] mips: MIPSCPU model subclasses


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 02/28] mips: MIPSCPU model subclasses
Date: Thu, 17 Aug 2017 08:15:34 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/17/2017 07:53 AM, Igor Mammedov wrote:
On Thu, 17 Aug 2017 00:38:59 -0300
Philippe Mathieu-Daudé <address@hidden> wrote:

Hi Igor,

On 07/15/2017 06:48 PM, Philippe Mathieu-Daudé wrote:
On 07/14/2017 10:51 AM, Igor Mammedov wrote:
Register separate QOM types for each mips cpu model,
so it would be possible to reuse generic CPU creation
routines.

Signed-off-by: Igor Mammedov <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
[...]
+static ObjectClass *mips_cpu_class_by_name(const char *cpu_model)
+{
+    ObjectClass *oc;
+    char *typename;
+
+    if (cpu_model == NULL) {
+        return NULL;
+    }
+
+    typename = mips_cpu_type_name(cpu_model);
+    oc = object_class_by_name(typename);
+    g_free(typename);
+    return oc;
   }
   static void mips_cpu_class_init(ObjectClass *c, void *data)
@@ -171,6 +196,7 @@ static void mips_cpu_class_init(ObjectClass *c,
void *data)
       mcc->parent_reset = cc->reset;
       cc->reset = mips_cpu_reset;
+    cc->class_by_name = mips_cpu_class_by_name;

Now than I'm reading again...

       cc->has_work = mips_cpu_has_work;
       cc->do_interrupt = mips_cpu_do_interrupt;
       cc->cpu_exec_interrupt = mips_cpu_exec_interrupt;
@@ -203,9 +229,34 @@ static const TypeInfo mips_cpu_type_info = {

Shouldn't this class now be abstract?
it should,

I see your are fixing it in your version of series,
so I'll just drop mips from my series so that you could merge
your version of mips part separately via your tree,
assuming you can do it fast once merge window is open
as I have another series on top that does more extensive
generalization/clean up and depends on this series
(including mips being properly QOMified)

Ok I'll squash it there.



reply via email to

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