[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/11] hw/isa/piix3: QOM'ify USB controller creation
From: |
Peter Maydell |
Subject: |
Re: [PATCH 03/11] hw/isa/piix3: QOM'ify USB controller creation |
Date: |
Thu, 14 Jul 2022 16:01:47 +0100 |
On Wed, 13 Jul 2022 at 09:49, Bernhard Beschow <shentey@gmail.com> wrote:
>
> The USB controller is an integral part of PIIX3 (function 2). So create
> it as part of the southbridge.
>
> Note that the USB function is optional in QEMU. This is why it gets
> unparented if it is disabled, otherwiese QEMU will abort with:
>
> src/hw/core/qdev.c:357: qdev_assert_realized_properly_cb: Assertion
> `dev->realized' failed
I would suggest doing the object_initialize_child() in realize when
we know whether usb is enabled or not, rather than always
initializing it and then unparenting it later. That's the way
I've handled "some property value determines whether or not the
device has a child object" in other places.
thanks
-- PMM
- Re: [PATCH 06/11] hw/i386/pc: No need for rtc_state to be an out-parameter, (continued)
- [PATCH 09/11] hw/isa/piix3: QOM'ify IDE controller creation, Bernhard Beschow, 2022/07/13
- [PATCH 05/11] hw/i386/pc: QOM'ify RTC creation, Bernhard Beschow, 2022/07/13
- [PATCH 08/11] hw/isa/piix3: QOM'ify ISA PIC creation, Bernhard Beschow, 2022/07/13
- [PATCH 07/11] hw/intc/i8259: Introduce i8259 proxy "isa-pic", Bernhard Beschow, 2022/07/13
- [PATCH 11/11] hw/isa/piix3: Remove extra ';' outside of functions, Bernhard Beschow, 2022/07/13
- [PATCH 02/11] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 southbridge, Bernhard Beschow, 2022/07/13
- [PATCH 03/11] hw/isa/piix3: QOM'ify USB controller creation, Bernhard Beschow, 2022/07/13
- Re: [PATCH 03/11] hw/isa/piix3: QOM'ify USB controller creation,
Peter Maydell <=
- [PATCH 10/11] hw/isa/piix3: Wire up ACPI interrupt internally, Bernhard Beschow, 2022/07/13
- Re: [PATCH 00/11] QOM'ify PIIX3 southbridge, Michael S. Tsirkin, 2022/07/26