qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-s390x <qemu-s390x@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [Qemu-devel] hw/s390x/ipl: Dubious use of qdev_reset_all_fn
Date: Mon, 27 May 2019 19:55:51 +0100	[thread overview]
Message-ID: <CAFEAcA-eCdmqgM1vSd2Ju4j9mqnrMZ_Knr4oQEsczLM4Wq_Pdw@mail.gmail.com> (raw)
In-Reply-To: <87v9xw1gi4.fsf@dusky.pond.sub.org>

On Mon, 27 May 2019 at 08:52, Markus Armbruster <armbru@redhat.com> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
> > Suggestions for how to restructure reset so this doesn't
> > happen are welcome... "reset follows the bus hierarchy"
> > works well in some places but is a bit weird in others
> > (for SoC containers and the like "follow the QOM
> > hierarchy" would make more sense, but I have no idea
> > how to usefully transition to a model where you could
> > say "for these devices, follow QOM tree for reset" or
> > what an API for that would look like).
>
> Here's a QOM composition tree for the ARM virt machine (-nodefaults
> -device e1000) as visible in qom-fuse under /machine, with irq and
> qemu:memory-region ommitted for brevity:

virt is a bit of an outlier because as a purely-virtual
machine it has no "SoC" -- it's just a bag of devices
at the machine level. It would be interesting to
also look at a machine that's emulating something
closer to real hardware (eg one of the aspeed machines,
or mps2-an521).

> Observations:
>
> * Composition tree root machine's containers are not in the qtree.
>
> * Composition tree node cortex-a15-arm-cpu is not in the qtree.  That's
>   because it's not a qdev (in QOM parlance: not a TYPE_DEVICE).

Hmm? The Arm CPUs all subclass CPUClass, which subclasses
DeviceState. The CPU is a qdev, but it is not in the qtree because
it does not have a bus it can live on.

> Now let me ramble a bit on reset.

Thanks for this -- I have put this on my list to
think through in detail next week.

-- PMM


  parent reply	other threads:[~2019-05-27 18:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 17:54 [Qemu-devel] hw/s390x/ipl: Dubious use of qdev_reset_all_fn Philippe Mathieu-Daudé
2019-05-24 18:04 ` David Hildenbrand
2019-05-24 18:20   ` Philippe Mathieu-Daudé
2019-05-24 18:28   ` Christian Borntraeger
2019-05-24 18:36     ` David Hildenbrand
2019-05-24 19:00       ` David Hildenbrand
2019-05-24 19:45         ` Christian Borntraeger
2019-05-24 19:58           ` David Hildenbrand
2019-05-25 15:03           ` Peter Maydell
2019-05-27  7:52             ` Markus Armbruster
2019-05-27  9:59               ` Philippe Mathieu-Daudé
2019-05-27 18:55               ` Peter Maydell [this message]
2019-05-28  5:02                 ` Markus Armbruster
2019-05-29  6:08                 ` Markus Armbruster
2019-05-29 10:32                   ` Philippe Mathieu-Daudé
2019-05-28  8:29           ` David Hildenbrand
2019-05-28  8:33             ` Cornelia Huck
2019-05-28  9:29               ` Philippe Mathieu-Daudé

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=CAFEAcA-eCdmqgM1vSd2Ju4j9mqnrMZ_Knr4oQEsczLM4Wq_Pdw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /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).