qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resetting non-qdev children in a 3-phase reset device


From: Markus Armbruster
Subject: Re: Resetting non-qdev children in a 3-phase reset device
Date: Sat, 24 Apr 2021 07:28:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]