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
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
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
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
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
-by: Kevin Wolf
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Damien Hedde
dependency on the
legacy QemuOpts infrastructure and even reduces the code size.
Signed-off-by: Kevin Wolf
Reviewed-by: Damien Hedde
dependency on the
legacy QemuOpts infrastructure and even reduces the code size.
Signed-off-by: Kevin Wolf
Reviewed-by: 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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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.
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.
>
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
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
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
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
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
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
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
>> --
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
69 matches
Mail list logo