qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_feat


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_features() hook
Date: Sun, 09 Mar 2014 16:45:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 04.03.2014 03:55, schrieb Andreas Färber:
> Adapt the X86CPU implementation to suit the generic hook.
> This involves a cleanup of error handling to cope with NULL errp.
> 
> Signed-off-by: Andreas Färber <address@hidden>
> ---
>  include/qom/cpu.h |  3 +++
>  target-i386/cpu.c | 36 +++++++++++++++++++++---------------
>  2 files changed, 24 insertions(+), 15 deletions(-)

X86CPU subclasses require the following trivial rebase:

diff --cc target-i386/cpu.c
index 3c3a987,653840a..0000000
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@@ -1941,7 -1923,15 +1946,7 @@@ X86CPU *cpu_x86_create(const char *cpu_
      object_unref(OBJECT(cpu));
  #endif

-     cpu_x86_parse_featurestr(cpu, features, &error);
 -    /* Emulate per-model subclasses for global properties */
 -    typename = g_strdup_printf("%s-" TYPE_X86_CPU, name);
 -    qdev_prop_set_globals_for_type(DEVICE(cpu), typename, &error);
 -    g_free(typename);
 -    if (error) {
 -        goto out;
 -    }
 -
+     x86_cpu_parse_featurestr(CPU(cpu), features, &error);
      if (error) {
          goto out;
      }
@@@ -2790,7 -2753,7 +2795,8 @@@ static void x86_cpu_common_class_init(O
      cc->reset = x86_cpu_reset;
      cc->reset_dump_flags = CPU_DUMP_FPU | CPU_DUMP_CCOP;

 +    cc->class_by_name = x86_cpu_class_by_name;
+     cc->parse_features = x86_cpu_parse_featurestr;
      cc->has_work = x86_cpu_has_work;
      cc->do_interrupt = x86_cpu_do_interrupt;
      cc->dump_state = x86_cpu_dump_state;

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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