qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_features() hook
Date: Wed, 5 Mar 2014 17:57:10 +0100	[thread overview]
Message-ID: <20140305175710.106c27f6@nial.usersys.redhat.com> (raw)
In-Reply-To: <53174B77.6020205@suse.de>

On Wed, 05 Mar 2014 17:06:15 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Am 05.03.2014 16:04, schrieb Igor Mammedov:
> > On Tue,  4 Mar 2014 03:55:44 +0100
> > Andreas Färber <afaerber@suse.de> wrote:
> > 
> >> 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(-)
> >>
> >> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> >> index 64ebfa5..43d253a 100644
> >> --- a/include/qom/cpu.h
> >> +++ b/include/qom/cpu.h
> >> @@ -67,6 +67,8 @@ struct TranslationBlock;
> >>   * CPUClass:
> >>   * @class_by_name: Callback to map -cpu command line model name to an
> >>   * instantiatable CPU type.
> >> + * @parse_features: Callback to parse command line arguments.
> >> + * The argument may be modified by the callback.
> > Could you specify which argument is expected to be modified?
> 
> Like so? "The arguments (%str) may be modified by the callback."
> 
> Alternatively I could drop that line, given that it's not const char *.
> Or add a typedef for the callback and document it there using @str syntax.
I'd prefer to drop it.

BTW: why is 'str' modified by callback?

> Thanks,
> Andreas
> 
> > 
> >>   * @reset: Callback to reset the #CPUState to its initial state.
> >>   * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
> >>   * @has_work: Callback for checking if there is work to do.
> >> @@ -96,6 +98,7 @@ typedef struct CPUClass {
> >>      /*< public >*/
> >>  
> >>      ObjectClass *(*class_by_name)(const char *cpu_model);
> >> +    void (*parse_features)(CPUState *cpu, char *str, Error **errp);
> >>  
> >>      void (*reset)(CPUState *cpu);
> >>      int reset_dump_flags;
> [snip]
> 

  reply	other threads:[~2014-03-05 16:57 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 [this message]
2014-03-05 22:31         ` Eduardo Habkost
2014-03-09 15:55           ` Andreas Färber
2014-03-09 15:45   ` Andreas Färber
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=20140305175710.106c27f6@nial.usersys.redhat.com \
    --to=imammedo@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=ehabkost@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).