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

2021-04-26 Thread Philippe Mathieu-Daudé
On 4/26/21 11:33 AM, Peter Maydell wrote: > On Mon, 26 Apr 2021 at 10:23, Philippe Mathieu-Daudé wrote: >> On 4/25/21 8:33 PM, Peter Maydell wrote: >>> On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé >>> wrote: I now understand better the diag288 case, but I still don't understand

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

2021-04-26 Thread Peter Maydell
On Mon, 26 Apr 2021 at 10:23, Philippe Mathieu-Daudé wrote: > > On 4/25/21 8:33 PM, Peter Maydell wrote: > > On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé > > wrote: > >> I now understand better the diag288 case, but I still don't understand > >> the TYPE_APIC one. It has no DeviceClass::

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

2021-04-26 Thread Philippe Mathieu-Daudé
On 4/25/21 8:33 PM, Peter Maydell wrote: > On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé wrote: >> I now understand better the diag288 case, but I still don't understand >> the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent >> TYPE_APIC_COMMON register apic_reset_common(

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

2021-04-26 Thread Peter Maydell
On Mon, 26 Apr 2021 at 06:19, Markus Armbruster wrote: > device_legacy_reset() is deprecated: > > /** > * device_legacy_reset: > * > * Reset a single device (by calling the reset method). > * Note: This function is deprecated and will be removed when it becomes > unused. >

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

2021-04-25 Thread Markus Armbruster
Peter Maydell writes: > On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé wrote: >> I now understand better the diag288 case, but I still don't understand >> the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent >> TYPE_APIC_COMMON register apic_reset_common() but being TYPE_

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

2021-04-25 Thread Peter Maydell
On Sat, 24 Apr 2021 at 14:04, Philippe Mathieu-Daudé wrote: > I now understand better the diag288 case, but I still don't understand > the TYPE_APIC one. It has no DeviceClass::reset(), its abstract parent > TYPE_APIC_COMMON register apic_reset_common() but being TYPE_DEVICE it > is not on a qbus.

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

2021-04-24 Thread Philippe Mathieu-Daudé
On 4/24/21 3:04 PM, Philippe Mathieu-Daudé wrote: > On 4/24/21 7:28 AM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >>> Looking at qemu_register_reset() uses I found this commit: commit 0c7322cfd3fd382c0096c2a9f00775818a878e13 Date: Mon Jun 29 08:21:10 2015 +02

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

2021-04-24 Thread Philippe Mathieu-Daudé
On 4/24/21 7:28 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: >> >>> 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 syste

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

2021-04-23 Thread Markus Armbruster
Philippe Mathieu-Daudé 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 syst

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

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/24/21 1:06 AM, Philippe Mathieu-Daudé wrote: > On 4/22/21 4:20 PM, Philippe Mathieu-Daudé wrote: >> On 4/22/21 3:21 PM, Markus Armbruster wrote: >>> Peter Maydell writes: > >>> Most qdevs plug into a qbus, but some don't. >>> >>> DeviceClass member @bus_type names the kind of bus the device

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

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/22/21 4:20 PM, Philippe Mathieu-Daudé wrote: > On 4/22/21 3:21 PM, Markus Armbruster wrote: >> Peter Maydell writes: >> Most qdevs plug into a qbus, but some don't. >> >> DeviceClass member @bus_type names the kind of bus the device plugs >> into. It's a QOM type name. Example: for a PCI d

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

2021-04-22 Thread Philippe Mathieu-Daudé
On 4/22/21 3:21 PM, Markus Armbruster wrote: > Peter Maydell writes: > >> On Sun, 18 Apr 2021 at 21:16, Philippe Mathieu-Daudé wrote: >>> >>> +Markus >>> >>> On 4/9/21 8:13 PM, Peter Maydell wrote: Maybe some mechanism for marking "these things which are my QOM children I want to be re

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

2021-04-22 Thread Markus Armbruster
Peter Maydell writes: > On Sun, 18 Apr 2021 at 21:16, Philippe Mathieu-Daudé wrote: >> >> +Markus >> >> On 4/9/21 8:13 PM, Peter Maydell wrote: >> > Maybe some mechanism for marking "these things which are my >> > QOM children I want to be reset when I am reset (so make them >> > reset children

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

2021-04-19 Thread Peter Maydell
On Sun, 18 Apr 2021 at 21:16, Philippe Mathieu-Daudé wrote: > > +Markus > > On 4/9/21 8:13 PM, Peter Maydell wrote: > > Maybe some mechanism for marking "these things which are my > > QOM children I want to be reset when I am reset (so make them > > reset children of me and don't reset them as par

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

2021-04-18 Thread Philippe Mathieu-Daudé
+Markus On 4/9/21 8:13 PM, Peter Maydell wrote: > I wanted to convert the hw/misc/mps2-scc.c device from old-style > to 3-phase reset as a prerequisite for another change to the device, > but I ran into a problem because currently it has some TYPE_DEVICE > QOM child objects, the LEDs. Because TYPE

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

2021-04-09 Thread Peter Maydell
I wanted to convert the hw/misc/mps2-scc.c device from old-style to 3-phase reset as a prerequisite for another change to the device, but I ran into a problem because currently it has some TYPE_DEVICE QOM child objects, the LEDs. Because TYPE_DEVICE don't live in the qbus hierarchy, the device rese