qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Damien Hedde <damien.hedde@greensocs.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Resetting non-qdev children in a 3-phase reset device
Date: Sat, 24 Apr 2021 07:28:07 +0200	[thread overview]
Message-ID: <87im4cb6ag.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <3dcb8efa-8f6b-0f45-a753-cc58d3bf9855@amsat.org> ("Philippe =?utf-8?Q?Mathieu-Daud=C3=A9=22's?= message of "Sat, 24 Apr 2021 01:28:56 +0200")

Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 4/24/21 1:06 AM, Philippe Mathieu-Daudé wrote:
>
>> Looking at qemu_register_reset() uses I found this commit:
>> 
>> commit 0c7322cfd3fd382c0096c2a9f00775818a878e13
>> Date:   Mon Jun 29 08:21:10 2015 +0200
>> 
>>  watchdog/diag288: correctly register for system reset requests
>> 
>>  The diag288 watchdog is no sysbus device, therefore it doesn't get
>>  triggered on resets automatically using dc->reset.
>> 
>>  Let's register the reset handler manually, so we get correctly notified
>>  again when a system reset was requested. Also reset the watchdog on
>>  subsystem resets that don't trigger a full system reset.
>> 
>> Why is the reset() handler in DeviceClass and not in SysbusDeviceClass
>> if "Only sysbus devices get reset"? ...
>
> Ah, probably because the problem is generic to all busses (ISA, ...)
> and not just sysbus.

diag288 is a bus-less device.  Propagating reset from the root of the
qtree to the leaves won't reach it, because the qtree contains only the
devices that plug into a qbus.

>>>> Sysbus may habe been a design mistake.  It goes back the qdev design
>>>> assumption "every device plugs into exactly one bus, every bus is part
>>>> of exactly one device, and the main system bus is the root of this
>>>> tree".  The assumption ceased to hold long ago, but we still have
>>>> sysbus.



  reply	other threads:[~2021-04-24  5:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 18:13 Resetting non-qdev children in a 3-phase reset device Peter Maydell
2021-04-18 20:16 ` Philippe Mathieu-Daudé
2021-04-19  9:03   ` Peter Maydell
2021-04-22 13:21     ` Markus Armbruster
2021-04-22 14:20       ` Philippe Mathieu-Daudé
2021-04-23 23:06         ` Philippe Mathieu-Daudé
2021-04-23 23:28           ` Philippe Mathieu-Daudé
2021-04-24  5:28             ` Markus Armbruster [this message]
2021-04-24 13:04               ` Philippe Mathieu-Daudé
2021-04-24 13:15                 ` Philippe Mathieu-Daudé
2021-04-25 18:33                 ` Peter Maydell
2021-04-26  5:19                   ` Markus Armbruster
2021-04-26  9:09                     ` Peter Maydell
2021-04-26  9:23                   ` Philippe Mathieu-Daudé
2021-04-26  9:33                     ` Peter Maydell
2021-04-26 11:14                       ` 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=87im4cb6ag.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=damien.hedde@greensocs.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --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).