All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Halil Pasic" <pasic@linux.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: Sat, 25 May 2019 16:03:55 +0100	[thread overview]
Message-ID: <CAFEAcA9K+d+LM5SfDrX0Ljwq8zWQdmJAM4R4cdHhF+tM1F13LQ@mail.gmail.com> (raw)
In-Reply-To: <d38b05af-effc-97a1-0b4a-a0d44a13f769@de.ibm.com>

On Fri, 24 May 2019 at 20:47, Christian Borntraeger
<borntraeger@de.ibm.com> wrote:
> While this patch is certainly ok, I find it disturbing that qdev devices are being resetted,
> but qom devices not.

It's not a qdev-vs-QOM thing. Anything which is a DeviceState
has a reset method, but only devices which are somewhere
rooted in the bus-tree that starts with the "main system
bus" (aka sysbus) get reset by the vl.c-registered "reset
everything on the system bus". Devices which are SysBusDevice
get auto-parented onto the sysbus, and so get reset. Devices
like PCI devices or SCSI devices get put onto the PCI
bus or the SCSI bus, and those buses are in turn children
of some host-controller device which is on the sysbus, so
they all get reset. The things that don't get reset are
"orphan" devices which are neither (a) of a type that gets
automatically parented onto a bus like SysBusDevice nor
(b) put specifically onto some other bus.

CPU objects are the other common thing that doesn't get
reset 'automatically'.

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).

thanks
-- PMM


  parent reply	other threads:[~2019-05-25 15:07 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 [this message]
2019-05-27  7:52             ` Markus Armbruster
2019-05-27  9:59               ` Philippe Mathieu-Daudé
2019-05-27 18:55               ` Peter Maydell
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=CAFEAcA9K+d+LM5SfDrX0Ljwq8zWQdmJAM4R4cdHhF+tM1F13LQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.