Re: [PATCH v4 12/12] hw/sparc64/cpu: Initialize GPIO before realizing CPU devices

2024-02-13 Thread Damien Hedde
cpu = SPARC_CPU(cpu_create(cpu_type)); +cpu = SPARC_CPU(object_new(cpu_type)); qdev_init_gpio_in_named(DEVICE(cpu), sparc64_cpu_set_ivec_irq, "ivec-irq", IVEC_MAX); +qdev_realize(DEVICE(cpu), NULL, _fatal); env = >env; env->tick = cpu_timer_create("tick", cpu, tick_irq, Reviewed-by: Damien Hedde

Re: [PATCH v4 04/12] hw/i386/q35: Realize LPC PCI function before accessing it

2024-02-13 Thread Damien Hedde
atal); for (i = 0; i < IOAPIC_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } -pci_realize_and_unref(lpc, host_bus, _fatal); rtc_state = ISA_DEVICE(object_resolve_path_component(OBJECT(lpc), "rtc")); Reviewed-by: Damien Hedde

Re: NVME hotplug support ?

2024-02-05 Thread Damien Hedde
On 1/29/24 16:35, Hannes Reinecke wrote: On 1/29/24 14:13, Damien Hedde wrote: On 1/24/24 08:47, Hannes Reinecke wrote: On 1/24/24 07:52, Philippe Mathieu-Daudé wrote: Hi Hannes, [+Markus as QOM/QDev rubber duck] On 23/1/24 13:40, Hannes Reinecke wrote: On 1/23/24 11:59, Damien Hedde

Re: NVME hotplug support ?

2024-01-29 Thread Damien Hedde
On 1/24/24 08:47, Hannes Reinecke wrote: On 1/24/24 07:52, Philippe Mathieu-Daudé wrote: Hi Hannes, [+Markus as QOM/QDev rubber duck] On 23/1/24 13:40, Hannes Reinecke wrote: On 1/23/24 11:59, Damien Hedde wrote: Hi all, We are currently looking into hotplugging nvme devices

NVME hotplug support ?

2024-01-23 Thread Damien Hedde
Hi all, We are currently looking into hotplugging nvme devices and it is currently not possible: When nvme was introduced 2 years ago, the feature was disabled. > commit cc6fb6bc506e6c47ed604fcb7b7413dff0b7d845 > Author: Klaus Jensen > Date: Tue Jul 6 10:48:40 2021 +0200 > >hw/nvme: mark

Re: [PATCH v2 08/15] qdev: Make DeviceState.id independent of QemuOpts

2021-10-13 Thread Damien Hedde
-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Damien Hedde

Re: [PATCH v2 02/15] net/vhost-user: Fix device compatibility check

2021-10-13 Thread Damien Hedde
dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf Reviewed-by: Damien Hedde

Re: [PATCH v2 03/15] net/vhost-vdpa: Fix device compatibility check

2021-10-13 Thread Damien Hedde
dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf Reviewed-by: Damien Hedde

Re: [PATCH v2 01/15] net: Introduce NetClientInfo.check_peer_type()

2021-10-13 Thread Damien Hedde
tries to attach, even on hotplug. Signed-off-by: Kevin Wolf Reviewed-by: Damien Hedde --- include/net/net.h| 2 ++ hw/core/qdev-properties-system.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 5d1508081f..986288eb07

Re: [PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-13 Thread Damien Hedde
On 10/11/21 23:00, Eric Blake wrote: On Fri, Oct 08, 2021 at 03:34:36PM +0200, Kevin Wolf wrote: From: Damien Hedde qdev_set_id() is mostly used when the user adds a device (using -device cli option or device_add qmp command). This commit adds an error parameter to handle the case where

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-05 Thread Damien Hedde
On 10/5/21 16:37, Kevin Wolf wrote: Am 27.09.2021 um 13:39 hat Kevin Wolf geschrieben: Am 27.09.2021 um 13:06 hat Damien Hedde geschrieben: On 9/24/21 11:04, Kevin Wolf wrote: Directly call qdev_device_add_from_qdict() for QMP device_add instead of first going through QemuOpts

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-04 Thread Damien Hedde
On 10/1/21 16:42, Peter Krempa wrote: On Fri, Sep 24, 2021 at 11:04:25 +0200, Kevin Wolf wrote: Directly call qdev_device_add_from_qdict() for QMP device_add instead of first going through QemuOpts and converting back to QDict. Note that this changes the behaviour of device_add, though in

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-09-27 Thread Damien Hedde
On 9/24/21 11:04, Kevin Wolf wrote: Directly call qdev_device_add_from_qdict() for QMP device_add instead of first going through QemuOpts and converting back to QDict. Note that this changes the behaviour of device_add, though in ways that should be considered bug fixes: QemuOpts ignores

Re: [PATCH 06/11] qdev: Add Error parameter to qdev_set_id()

2021-09-27 Thread Damien Hedde
Hi Kevin, I proposed a very similar patch in our rfc series because we needed some of the cleaning you do here. https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg05679.html I've added a bit of doc for the function, feel free to take it if you want. On 9/24/21 16:09, Vladimir

[Qemu-block] [PATCH v4 01/10] add device_legacy_reset function to prepare for reset api change

2019-08-21 Thread Damien Hedde
buses as well as the specified device). Subsequent commits will make the changeover for each call site individually; once that is complete device_legacy_reset() will be removed. Signed-off-by: Damien Hedde Reviewed-by: Peter Maydell --- Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: "Dan

Re: [Qemu-block] [PATCH v3 04/33] make Device and Bus Resettable

2019-08-12 Thread Damien Hedde
On 8/7/19 4:41 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: >> >> >> +/** >> + * device_reset: >> + * Resets the device @dev, @cold tell whether to do a cold or warm reset. >> + * Base behavior is to reset the device and

Re: [Qemu-block] [PATCH v3 07/33] automatically add vmstate for reset support in devices

2019-08-09 Thread Damien Hedde
On 8/9/19 12:32 PM, Peter Maydell wrote: > On Fri, 9 Aug 2019 at 11:29, Damien Hedde wrote: >> >> One way to keep the feature without copy-pasting vmsd would be to add >> a new vmstate_register with an additional argument to pass the base >> class vmsd section

Re: [Qemu-block] [PATCH v3 07/33] automatically add vmstate for reset support in devices

2019-08-09 Thread Damien Hedde
On 8/9/19 12:07 PM, Peter Maydell wrote: > On Thu, 8 Aug 2019 at 16:42, Dr. David Alan Gilbert > wrote: >> >> * Peter Maydell (peter.mayd...@linaro.org) wrote: >>> On Mon, 29 Jul 2019 at 15:59, Damien Hedde >>> wrote: >>>> >>>> T

Re: [Qemu-block] [Qemu-devel] [PATCH v3 12/33] hw/pci/: remove qdev/qbus_reset_all call

2019-08-09 Thread Damien Hedde
On 8/7/19 5:31 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:59, Damien Hedde wrote: >> >> Replace deprecated qdev/bus_reset_all by device/bus_reset_warm. >> >> This does not impact the behavior. >> >> Signed-off-by: Damien Hedde > > I'll

Re: [Qemu-block] [Qemu-devel] [PATCH v3 02/33] add temporary device_legacy_reset function to replace device_reset

2019-08-09 Thread Damien Hedde
On 8/7/19 4:27 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: >> >> Provide a temporary function doing what device_reset does to do the >> transition with Resettable API which will trigger a prototype change >> of device_reset

Re: [Qemu-block] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-08-09 Thread Damien Hedde
On 8/9/19 7:51 AM, David Gibson wrote: > On Wed, Aug 07, 2019 at 11:37:51AM +0100, Peter Maydell wrote: >> On Wed, 31 Jul 2019 at 07:33, David Gibson >> wrote: >>> >>> On Mon, Jul 29, 2019 at 04:56:29PM +0200, Damien Hedde wrote: >>>> It adds the p

Re: [Qemu-block] [PATCH v3 14/33] hw/s390x/s390-virtio-ccw.c: remove qdev_reset_all call

2019-08-09 Thread Damien Hedde
On 8/8/19 12:50 PM, Cornelia Huck wrote: > On Mon, 29 Jul 2019 16:56:35 +0200 > Damien Hedde wrote: > >> Replace deprecated qdev_reset_all by device_reset_warm. >> >> This does not impact the behavior. > > Not so sure about that; see below. In this case,

Re: [Qemu-block] [PATCH v3 07/33] automatically add vmstate for reset support in devices

2019-08-07 Thread Damien Hedde
On 8/7/19 5:07 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:59, Damien Hedde wrote: >> >> This add the reset related sections for every QOM >> device. > > A bit more detail in the commit message would help, I think -- > this is adding extra machiner

Re: [Qemu-block] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-08-07 Thread Damien Hedde
On 8/7/19 5:18 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:59, Damien Hedde wrote: >> >> It adds the possibility to add 2 gpios to control the warm and cold reset. >> With theses ios, the reset can be maintained during some time. >> Each io is associated w

Re: [Qemu-block] [PATCH v3 06/33] add the vmstate description for device reset state

2019-08-07 Thread Damien Hedde
On 8/7/19 4:54 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: >> >> It contains the resetting counter and cold flag status. >> >> At this point, migration of bus reset related state (counter and cold/warm >> flag) is handled

Re: [Qemu-block] [PATCH v3 04/33] make Device and Bus Resettable

2019-08-07 Thread Damien Hedde
On 8/7/19 4:41 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: >> >> This add Resettable interface implementation for both Bus and Device. >> >> *resetting* counter and *reset_is_cold* flag are added in DeviceState >> and BusState.

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-07 Thread Damien Hedde
On 8/7/19 4:20 PM, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: >> >> This commit defines an interface allowing multi-phase reset. >> The phases are INIT, HOLD and EXIT. Each phase has an associated method >> in the class. >

Re: [Qemu-block] [PATCH v3 04/33] make Device and Bus Resettable

2019-08-07 Thread Damien Hedde
On 8/6/19 2:35 AM, David Gibson wrote: > On Wed, Jul 31, 2019 at 11:09:05AM +0200, Damien Hedde wrote: >> >> >> On 7/31/19 7:56 AM, David Gibson wrote: >>> On Mon, Jul 29, 2019 at 04:56:25PM +0200, Damien Hedde wrote: >>>> This add Resettable interf

Re: [Qemu-block] [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 7:46 AM, David Gibson wrote: > On Tue, Jul 30, 2019 at 04:08:59PM +0200, Damien Hedde wrote: >> >> On 7/30/19 3:59 PM, Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >>>> >>>> On Tue, 30 J

Re: [Qemu-block] [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 12:17 PM, Christophe de Dinechin wrote: > > Peter Maydell writes: > >> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >>> >>> On Tue, 30 Jul 2019 14:44:21 +0100 >>> Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > I'm having a hard time

Re: [Qemu-block] [PATCH v3 06/33] add the vmstate description for device reset state

2019-07-31 Thread Damien Hedde
On 7/31/19 8:08 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:27PM +0200, Damien Hedde wrote: >> It contains the resetting counter and cold flag status. >> >> At this point, migration of bus reset related state (counter and cold/warm >> flag) is handled

Re: [Qemu-block] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-07-31 Thread Damien Hedde
On 7/31/19 8:11 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:29PM +0200, Damien Hedde wrote: >> It adds the possibility to add 2 gpios to control the warm and cold reset. >> With theses ios, the reset can be maintained during some time. >> Each io is associated w

Re: [Qemu-block] [PATCH v3 09/33] add doc about Resettable interface

2019-07-31 Thread Damien Hedde
On 7/31/19 8:30 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:30PM +0200, Damien Hedde wrote: >> Signed-off-by: Damien Hedde >> --- >> docs/devel/reset.txt | 165 +++ >> 1 file changed, 165 insertions(+) >&g

Re: [Qemu-block] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-07-31 Thread Damien Hedde
On 7/31/19 8:05 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:26PM +0200, Damien Hedde wrote: >> Deprecate old reset apis and make them use the new one while they >> are still used somewhere. >> >> Signed-off-by: Damien Hedde >> --

Re: [Qemu-block] [PATCH v3 04/33] make Device and Bus Resettable

2019-07-31 Thread Damien Hedde
On 7/31/19 7:56 AM, David Gibson wrote: > On Mon, Jul 29, 2019 at 04:56:25PM +0200, Damien Hedde wrote: >> This add Resettable interface implementation for both Bus and Device. >> >> *resetting* counter and *reset_is_cold* flag are added in DeviceState >> and Bu

Re: [Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Damien Hedde
On 7/30/19 3:59 PM, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >> >> On Tue, 30 Jul 2019 14:44:21 +0100 >> Peter Maydell wrote: >> >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: I'm having a hard time figuring out what a 'cold' or a 'warm' reset is

[Qemu-block] [PATCH v3 29/33] hw/misc/zynq_slcr: use standard register definition

2019-07-29 Thread Damien Hedde
Replace the zynq_slcr registers enum and macros using the hw/registerfields.h macros. Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/misc/zynq_slcr.c | 472 ++-- 1 file changed, 236 insertions

[Qemu-block] [PATCH v3 22/33] hw/ppc/pnv_psi.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree but this has no impact since XiveSource has no child bus. Signed-off-by: Damien Hedde --- hw/ppc/pnv_psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw

[Qemu-block] [PATCH v3 31/33] Convert zynq's slcr to 3-phases reset

2019-07-29 Thread Damien Hedde
Change the legacy reset function into the init phase and test the resetting flag in register accesses. Signed-off-by: Damien Hedde --- hw/misc/zynq_slcr.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/hw/misc/zynq_slcr.c b/hw/misc

[Qemu-block] [PATCH v3 30/33] convert cadence_uart to 3-phases reset

2019-07-29 Thread Damien Hedde
Split the existing reset procedure into 3 phases. Test the resetting flag to discard register accesses and character reception. Also adds a active high reset io. Signed-off-by: Damien Hedde --- hw/char/cadence_uart.c | 77 +++--- 1 file changed, 73 insertions

[Qemu-block] [PATCH v3 25/33] hw/i386/pc.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace additional APIC legacy reset by device_reset_cold. The new function propagates also the reset to the sub-buses tree. APIC does not have any so it should have no impact on behavior. Signed-off-by: Damien Hedde --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-block] [PATCH v3 24/33] hw/ppc/spapr: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
of a SpaprPhbState. If there is a device with a child bus, then this bus will now be reset (and all its qdev tree). Signed-off-by: Damien Hedde --- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc

[Qemu-block] [PATCH v3 26/33] hw/s390x/s390-pci-inst.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace S390PCIBusDevice legacy reset by device_reset_warm. The new function propagates also the reset to the sub-buses tree. I'm not sure whether S390PCIBusDevice has bus children or not. Signed-off-by: Damien Hedde --- hw/s390x/s390-pci-inst.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-block] [PATCH v3 15/33] hw/ide/piix.c: remove qdev_reset_all call

2019-07-29 Thread Damien Hedde
Replace deprecated qdev_reset_all by device_reset_warm. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/ide/piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b97e555072..64cb4a52ef 100644 --- a/hw/ide/piix.c

[Qemu-block] [PATCH v3 23/33] hw/scsi/vmw_pvscsi.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree but this has no impact since SCSIDevices have no child bus (neither generic device nor disks). Signed-off-by: Damien Hedde --- hw/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1

[Qemu-block] [PATCH v3 11/33] hw/s390x/ipl.c: remove qbus_reset_all registration

2019-07-29 Thread Damien Hedde
Replace deprecated qbus_reset_all by resettable_reset_cold_fn for the ipl registration in the main reset handlers. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/s390x/ipl.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw

[Qemu-block] [PATCH v3 00/33] Multi-phase reset mechanism

2019-07-29 Thread Damien Hedde
remaining legacy reset API - Patches 29 to 33 modify the xilinx_zynq to add 3-phases reset support in the uart and the slcr (the reset controller of the soc). Thanks, Damien Damien Hedde (33): Create Resettable QOM interface add temporary device_legacy_reset function to replace d

[Qemu-block] [PATCH v3 14/33] hw/s390x/s390-virtio-ccw.c: remove qdev_reset_all call

2019-07-29 Thread Damien Hedde
Replace deprecated qdev_reset_all by device_reset_warm. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/s390x/s390-virtio-ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 5b6a9a4e55

[Qemu-block] [PATCH v3 27/33] hw/ide/microdrive.c: remove device_legacy_reset calls

2019-07-29 Thread Damien Hedde
are not implemented so resetting the qdev/qbus ide tree will have no effect. Keep the explicit call to ide_bus_reset (in md_reset function) since it is not called when using the standard reset method of the IDE_BUS object. Signed-off-by: Damien Hedde --- hw/ide/microdrive.c | 8 1 file changed, 4

[Qemu-block] [PATCH v3 07/33] automatically add vmstate for reset support in devices

2019-07-29 Thread Damien Hedde
This add the reset related sections for every QOM device. Signed-off-by: Damien Hedde --- hw/core/qdev-vmstate.c | 41 + hw/core/qdev.c | 12 +++- include/hw/qdev-core.h | 3 +++ stubs/Makefile.objs| 1 + stubs/device.c | 7

[Qemu-block] [PATCH v3 06/33] add the vmstate description for device reset state

2019-07-29 Thread Damien Hedde
. Signed-off-by: Damien Hedde --- hw/core/Makefile.objs | 1 + hw/core/qdev-vmstate.c | 45 ++ 2 files changed, 46 insertions(+) create mode 100644 hw/core/qdev-vmstate.c diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index d9234aa98a

[Qemu-block] [PATCH v3 09/33] add doc about Resettable interface

2019-07-29 Thread Damien Hedde
Signed-off-by: Damien Hedde --- docs/devel/reset.txt | 165 +++ 1 file changed, 165 insertions(+) create mode 100644 docs/devel/reset.txt diff --git a/docs/devel/reset.txt b/docs/devel/reset.txt new file mode 100644 index 00..c7a1eb068f --- /dev

[Qemu-block] [PATCH v3 20/33] hw/hyperv/hyperv.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm in *hyperv_synic_reset*. The new function propagates also the reset to the sub-buses tree but this has no impact since SynICState has no child bus. Signed-off-by: Damien Hedde --- hw/hyperv/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-block] [PATCH v3 10/33] vl.c: remove qbus_reset_all registration

2019-07-29 Thread Damien Hedde
Replace deprecated qbus_reset_all by resettable_reset_cold_fn for the sysbus reset registration. This does not impact the behavior. Signed-off-by: Damien Hedde --- vl.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index b426b32134..5a465c8236 100644

[Qemu-block] [PATCH v3 32/33] Add uart reset support in zynq_slcr

2019-07-29 Thread Damien Hedde
Add two gpio outputs to control the uart resets. Signed-off-by: Damien Hedde --- hw/misc/zynq_slcr.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index 6fcdbce4f0..b6c9a281c2 100644 --- a/hw

[Qemu-block] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-29 Thread Damien Hedde
-to-parent order. This will allow to replace current qdev_reset mechanism by this interface without side-effects on reset order. Note: I used an uint32 for the count. This match the type already used in the existing resetting counter in hw/scsi/vmw_pvscsi.c for the PVSCSIState. Signed-off-by: Da

[Qemu-block] [PATCH v3 12/33] hw/pci/: remove qdev/qbus_reset_all call

2019-07-29 Thread Damien Hedde
Replace deprecated qdev/bus_reset_all by device/bus_reset_warm. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/pci/pci.c| 6 +++--- hw/pci/pci_bridge.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index

[Qemu-block] [PATCH v3 03/33] Replace all call to device_reset by call to device_legacy_reset

2019-07-29 Thread Damien Hedde
Signed-off-by: Damien Hedde --- hw/audio/intel-hda.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/pc.c | 2 +- hw/ide/microdrive.c | 8 hw/intc/spapr_xive.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c

[Qemu-block] [PATCH v3 16/33] hw/input/adb.c: remove qdev_reset_all call

2019-07-29 Thread Damien Hedde
Replace deprecated qdev_reset_all by device_reset_warm. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/input/adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/adb.c b/hw/input/adb.c index 1446f32521..6b35682aba 100644 --- a/hw/input/adb.c

[Qemu-block] [PATCH v3 08/33] Add function to control reset with gpio inputs

2019-07-29 Thread Damien Hedde
It adds the possibility to add 2 gpios to control the warm and cold reset. With theses ios, the reset can be maintained during some time. Each io is associated with a state to detect level changes. Vmstate subsections are also added to the existsing device_reset subsection. Signed-off-by: Damien

[Qemu-block] [PATCH v3 05/33] Switch to new api in qdev/bus

2019-07-29 Thread Damien Hedde
Deprecate old reset apis and make them use the new one while they are still used somewhere. Signed-off-by: Damien Hedde --- hw/core/qdev.c | 22 +++--- include/hw/qdev-core.h | 28 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff

[Qemu-block] [PATCH v3 33/33] Connect the uart reset gpios in the zynq platform

2019-07-29 Thread Damien Hedde
Connect the two uart reset inputs to the slcr corresponding outputs. Signed-off-by: Damien Hedde --- hw/arm/xilinx_zynq.c | 14 -- include/hw/char/cadence_uart.h | 10 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm

[Qemu-block] [PATCH v3 02/33] add temporary device_legacy_reset function to replace device_reset

2019-07-29 Thread Damien Hedde
Provide a temporary function doing what device_reset does to do the transition with Resettable API which will trigger a prototype change of device_reset. Signed-off-by: Damien Hedde --- hw/core/qdev.c | 6 +++--- include/hw/qdev-core.h | 9 +++-- 2 files changed, 10 insertions(+), 5

[Qemu-block] [PATCH v3 28/33] qdev: Remove unused deprecated reset functions

2019-07-29 Thread Damien Hedde
Remove the functions now they are unused: + device_legacy_reset + qdev_reset_all[_fn] + qbus_reset_all[_fn] Signed-off-by: Damien Hedde --- hw/core/qdev.c | 30 -- include/hw/qdev-core.h | 29 - 2 files changed, 59 deletions

[Qemu-block] [PATCH v3 13/33] hw/scsi/: remove qdev/qbus_reset_all call

2019-07-29 Thread Damien Hedde
Replace deprecated qdev/bus_reset_all by device/bus_reset_warm. This does not impact the behavior. Signed-off-by: Damien Hedde --- hw/scsi/lsi53c895a.c | 4 ++-- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 8 hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/virtio-scsi.c | 6

[Qemu-block] [PATCH v3 04/33] make Device and Bus Resettable

2019-07-29 Thread Damien Hedde
ntly under reset and if the current reset is cold or not. Signed-off-by: Damien Hedde --- hw/core/bus.c | 85 ++ hw/core/qdev.c | 82 include/hw/qdev-c

[Qemu-block] [PATCH v3 18/33] hw/audio/intel-hda.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree but this has no impact since since HDACodecDevice has no child bus. Signed-off-by: Damien Hedde --- hw/audio/intel-hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-block] [PATCH v3 21/33] hw/intc/spapr_xive.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree but this has no impact since SpaprXive has no child bus. Signed-off-by: Damien Hedde --- hw/intc/spapr_xive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-block] [PATCH v3 19/33] hw/sd/pl181.c & omap_mmc.c: remove device_legacy_reset call

2019-07-29 Thread Damien Hedde
Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree but this has no impact since SDState has no child bus. Signed-off-by: Damien Hedde --- hw/sd/omap_mmc.c | 2 +- hw/sd/pl181.c| 2 +- 2 files changed, 2 insertions(+), 2