]> git.proxmox.com Git - mirror_qemu.git/commit
hw/i386/pc_piix: Move i440fx' realize near its qdev_new()
authorBernhard Beschow <shentey@gmail.com>
Fri, 30 Jun 2023 07:37:20 +0000 (09:37 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Jul 2023 20:29:17 +0000 (16:29 -0400)
commitc589f7cf0860534dfd21023dec2ec322688a5a03
treea4d3a3e89cf0617fb5baa82c7d0fa5d53c6bb67c
parentce5ac09a7548d90ac414f60bbe87c69a8487de10
hw/i386/pc_piix: Move i440fx' realize near its qdev_new()

I440FX realization is currently mixed with PIIX3 creation. Furthermore, it is
common practice to only set properties between a device's qdev_new() and
qdev_realize(). Clean up to resolve both issues.

Since I440FX spawns a PCI bus let's also move the pci_bus initialization there.

Note that when running `qemu-system-x86_64 -M pc -S` before and after this
patch, `info mtree` in the QEMU console doesn't show any differences except that
the ordering is different.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-18-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc_piix.c