From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Igor Mammedov <imammedo@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_features() hook
Date: Sun, 09 Mar 2014 16:45:20 +0100 [thread overview]
Message-ID: <531C8C90.3050106@suse.de> (raw)
In-Reply-To: <1393901749-5944-2-git-send-email-afaerber@suse.de>
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 <afaerber@suse.de>
> ---
> 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
next prev parent reply other threads:[~2014-03-09 15:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 2:55 [Qemu-devel] [PATCH qom-cpu 0/6] cpu: Unifying features parsing Andreas Färber
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_features() hook Andreas Färber
2014-03-05 15:04 ` Igor Mammedov
2014-03-05 16:06 ` Andreas Färber
2014-03-05 16:57 ` Igor Mammedov
2014-03-05 22:31 ` Eduardo Habkost
2014-03-09 15:55 ` Andreas Färber
2014-03-09 15:45 ` Andreas Färber [this message]
2014-03-10 11:25 ` Igor Mammedov
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 2/6] target-sparc: Use error_report() for CPU error reporting Andreas Färber
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 3/6] target-sparc: Implement CPUClass::parse_features() for SPARCCPU Andreas Färber
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 4/6] target-sparc: Defer SPARCCPU feature inference to QOM realize Andreas Färber
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 5/6] cpu: Implement CPUClass::parse_features() for the rest of CPUs Andreas Färber
2014-03-04 2:55 ` [Qemu-devel] [PATCH qom-cpu 6/6] cpu: Factor out cpu_generic_init() Andreas Färber
2014-03-04 20:32 ` [Qemu-devel] [PATCH qom-cpu 0/6] cpu: Unifying features parsing Andreas Färber
2014-03-08 20:50 ` Mark Cave-Ayland
2014-03-09 16:19 ` Andreas Färber
2014-03-05 2:50 ` Alexey Kardashevskiy
2014-03-05 8:30 ` Andreas Färber
2014-03-05 11:27 ` Alexey Kardashevskiy
2014-03-09 16:11 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=531C8C90.3050106@suse.de \
--to=afaerber@suse.de \
--cc=aik@ozlabs.ru \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).