From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qdev_get_machine() can return something non-NULL but not TYPE_MACHINE
Date: Tue, 12 Sep 2017 11:53:24 +0200 [thread overview]
Message-ID: <20170912115324.3c60a6b0@nial.brq.redhat.com> (raw)
In-Reply-To: <CAFEAcA-swU6nuw2LHFxT2MEzACGcR4SP6+EU-TtWbm6LvPKzyA@mail.gmail.com>
On Tue, 12 Sep 2017 10:11:32 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:
> On 12 September 2017 at 08:40, Igor Mammedov <imammedo@redhat.com> wrote:
> > On Mon, 11 Sep 2017 14:33:03 +0100
> > Peter Maydell <peter.maydell@linaro.org> wrote:
> >> It's not possible in all cases to set a CPU property from the
> >> top level board code. In quite a lot of cases the CPU
> >> object is created by an SoC object which is in turn
> >> created by the board code, and there is no plumbing
> >> there to pass arbitrary properties through to the CPU
> >> object...
> > there is a cleaner way without cpu accessing machine,
> > make it property of cpu and use compat machinery that
> > was invented for fixing up stuff of this kind.
> >
> > SET_MACHINE_COMPAT(MachineClass,
> > { .driver = "arm-cpu",
> > .property = "foo",
> > .value = "off",
> > }
> > )
>
> It looks like we only use that machine-compat stuff on
> our versioned boards, which is pretty much the only place
> where we don't need to set this particular flag...
typically, yes it's used for versioned boards to, because
it's where we have to fixup/override defaults to keep compatibility.
But it's does not mean that it's limited to it.
in this case it allows to keep clean separation of device model
and not add an extra member to generic MachineClass which is used
by some old boards.
> thanks
> -- PMM
>
prev parent reply other threads:[~2017-09-12 9:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 16:36 [Qemu-devel] qdev_get_machine() can return something non-NULL but not TYPE_MACHINE Peter Maydell
2017-09-04 19:38 ` Igor Mammedov
2017-09-05 9:08 ` Peter Maydell
2017-09-11 12:10 ` Igor Mammedov
2017-09-11 13:33 ` Peter Maydell
2017-09-12 7:40 ` Igor Mammedov
2017-09-12 9:11 ` Peter Maydell
2017-09-12 9:53 ` Igor Mammedov [this message]
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=20170912115324.3c60a6b0@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).