From: Igor Mammedov <imammedo@redhat.com>
To: Michael Rolnik <mrolnik@gmail.com>
Cc: Sarah Harris <S.E.Harris@kent.ac.uk>,
QEMU Developers <qemu-devel@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH RFC v20 1/8] target/avr: Add outward facing interfaces and core CPU logic
Date: Fri, 31 May 2019 11:56:55 +0200 [thread overview]
Message-ID: <20190531115655.0c0c85ef@redhat.com> (raw)
In-Reply-To: <CAK4993h5ddy0jA6_Yp-vHgDpg8nwcoqg2W+uTn45mAcHEPXSqA@mail.gmail.com>
On Fri, 31 May 2019 11:15:01 +0300
Michael Rolnik <mrolnik@gmail.com> wrote:
> Hi Igor.
>
> Please explain what I should do.
Maybe look at inline comments which are somewhere in the body of reply.
> thank you,
> Michael
>
> On Fri, May 31, 2019 at 11:02 AM Igor Mammedov <imammedo@redhat.com> wrote:
>
> > On Thu, 30 May 2019 22:07:31 +0300
> > Michael Rolnik <mrolnik@gmail.com> wrote:
[...]
> > > +static ObjectClass *avr_cpu_class_by_name(const char *cpu_model)
> > > +{
> > > + ObjectClass *oc;
> > > + char *name;
> > > +
> > > + if (!cpu_model) {
> > > + return NULL;
> > > + }
> > > +
> > > + oc = object_class_by_name(cpu_model);
> > > + if (oc != NULL && object_class_dynamic_cast(oc, TYPE_AVR_CPU) !=
> > NULL &&
> > > + !object_class_is_abstract(oc)) {
> > > + return oc;
> > > + }
> >
> > In other targets QEMU has 1-2 or more naming variants but that were
> > influenced
> > by legacy code and we have to keep compatibility not to break existing
> > configurations.
> >
> > In case of new cpu, I'd keep only above hunk and drop the rest so that
> > only one naming scheme would be available, which is compatible with
> > '-device' naming and QMP/monitor interfaces that we support.
> >
I've suggested to leave only above hunk and drop following hunk.
this way only full cpu type name will be accepted by '-cpu'
> > > + name = g_strdup_printf(AVR_CPU_TYPE_NAME("%s"), cpu_model);
> > > + oc = object_class_by_name(name);
> > > + g_free(name);
> > > + if (oc != NULL && object_class_dynamic_cast(oc, TYPE_AVR_CPU) !=
> > NULL &&
> > > + !object_class_is_abstract(oc)) {
> > > + return oc;
> > > + }
since suffix trick will be removed, you'll probably need to
amend/simplify avr_cpu_list_entry() as well.
> > > + return NULL;
> > > +}
> > > +
[...]
next prev parent reply other threads:[~2019-05-31 9:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 19:07 [Qemu-devel] [PATCH RFC v20 0/8] QEMU AVR 8 bit cores Michael Rolnik
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 1/8] target/avr: Add outward facing interfaces and core CPU logic Michael Rolnik
2019-05-31 8:02 ` Igor Mammedov
2019-05-31 8:15 ` Michael Rolnik
2019-05-31 9:56 ` Igor Mammedov [this message]
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 2/8] target/avr: Add instruction helpers Michael Rolnik
2019-05-31 13:50 ` Richard Henderson
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection Michael Rolnik
2019-05-31 13:54 ` Richard Henderson
2019-06-01 21:12 ` Michael Rolnik
2019-06-03 15:44 ` Richard Henderson
2019-06-03 16:29 ` Michael Rolnik
2019-06-03 16:36 ` Richard Henderson
2019-06-03 17:04 ` Michael Rolnik
2019-06-05 7:20 ` Michael Rolnik
2019-06-05 14:36 ` Richard Henderson
2019-06-05 15:19 ` Michael Rolnik
2019-06-05 16:06 ` Richard Henderson
2019-06-05 16:10 ` Alex Bennée
2019-06-05 17:57 ` Michael Rolnik
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 4/8] target-avr: Add instruction decoding Michael Rolnik
2019-05-31 14:45 ` Richard Henderson
2019-06-03 20:13 ` Michael Rolnik
2019-06-03 21:48 ` Richard Henderson
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 5/8] target/avr: Add instruction translation Michael Rolnik
2019-05-31 15:31 ` Richard Henderson
2019-06-02 3:44 ` Michael Rolnik
2019-06-03 15:31 ` Richard Henderson
2019-06-03 15:34 ` Michael Rolnik
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 6/8] target/avr: Add limited support for USART and 16 bit timer peripherals Michael Rolnik
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 7/8] target/avr: Add example board configuration Michael Rolnik
2019-05-31 8:06 ` Igor Mammedov
2019-05-30 19:07 ` [Qemu-devel] [PATCH RFC v20 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file Michael Rolnik
2019-05-31 14:50 ` Eric Blake
2019-06-01 21:20 ` Michael Rolnik
2019-06-03 19:47 ` Eric Blake
2019-06-03 19:53 ` Michael Rolnik
2019-05-30 20:16 ` [Qemu-devel] [PATCH RFC v20 0/8] QEMU AVR 8 bit cores no-reply
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=20190531115655.0c0c85ef@redhat.com \
--to=imammedo@redhat.com \
--cc=S.E.Harris@kent.ac.uk \
--cc=mrolnik@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).