[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization
From: |
Laurent Vivier |
Subject: |
[PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization |
Date: |
Tue, 1 Sep 2020 16:09:22 +0200 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
When realizing a Super I/O with IDE controller [*], we get:
qom/object.c:1684: object_property_try_add_child: Assertion `!child->parent'
failed.
Aborted (core dumped)
This is because the device is already realized when we try to
add the QOM property to the parent. Fix by realizing *after*
adding the QOM relationship.
[*] Set ISASuperIOClass::ide.count = N with N not zero
(no such thing currently exists; the bug is latent)
Fixes: e508430619 ("hw/isa/superio: Make the components QOM children")
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200721124516.9602-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/isa/isa-superio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index e2e47d8fd99a..179c1856956b 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -158,8 +158,8 @@ static void isa_superio_realize(DeviceState *dev, Error
**errp)
if (k->ide.get_irq) {
qdev_prop_set_uint32(d, "irq", k->ide.get_irq(sio, 0));
}
- isa_realize_and_unref(isa, bus, &error_fatal);
object_property_add_child(OBJECT(sio), "isa-ide", OBJECT(isa));
+ isa_realize_and_unref(isa, bus, &error_fatal);
sio->ide = isa;
trace_superio_create_ide(0,
k->ide.get_iobase ?
--
2.26.2
- [PULL 00/44] Trivial branch for 5.2 patches, Laurent Vivier, 2020/09/01
- [PULL 00/44] Trivial branch for 5.2 patches, Laurent Vivier, 2020/09/01
- [PULL 01/44] hw/register: Document register_init_block @memory_size, Laurent Vivier, 2020/09/01
- [PULL 03/44] target/ppc: Remove superfluous breaks, Laurent Vivier, 2020/09/01
- [PULL 10/44] hw/net/can: Add missing fallthrough statements, Laurent Vivier, 2020/09/01
- [PULL 13/44] stubs/cmos: Use correct include, Laurent Vivier, 2020/09/01
- [PULL 04/44] scsi: Remove superfluous breaks, Laurent Vivier, 2020/09/01
- [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization,
Laurent Vivier <=
- [PULL 15/44] hw/core/sysbus: Fix a typo, Laurent Vivier, 2020/09/01
- [PULL 16/44] hw/core/sysbus: Assert memory region index is in range, Laurent Vivier, 2020/09/01
- [PULL 18/44] docs: Fix broken links, Laurent Vivier, 2020/09/01
- [PULL 17/44] Revert "mailmap: Update philmd email address", Laurent Vivier, 2020/09/01
- [PULL 20/44] hw/i2c: Fix typo in description, Laurent Vivier, 2020/09/01
- [PULL 02/44] target/arm/kvm: Remove superfluous break, Laurent Vivier, 2020/09/01
- [PULL 23/44] mailmap: Add entry for Greg Kurz, Laurent Vivier, 2020/09/01
- [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message, Laurent Vivier, 2020/09/01
- [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation, Laurent Vivier, 2020/09/01
- [PULL 08/44] target/sh4: Remove superfluous breaks, Laurent Vivier, 2020/09/01