]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
pci_host: Turn into SysBus-derived QOM type
authorAndreas Färber <andreas.faerber@web.de>
Mon, 20 Aug 2012 17:08:07 +0000 (19:08 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Aug 2012 15:47:17 +0000 (10:47 -0500)
commitb44ff9d430c5f2b51872f542d9562a15f0061a82
treec0d75b54208feb7cff681971d69b73962162fe81
parent57fd7b7fce9098cdac58a8442033cb91412400b9
pci_host: Turn into SysBus-derived QOM type

The preceding commits fixed misuses of FROM_SYSBUS() that led people to
add a bogus busdev field. For qdev the field order was less relevant but
for QOM the PCIHostState field (including the SysBusDevice actually
initialized with a value) must be placed first within the state struct.

To facilitate accessing the PCIHostState fields, derive all PCI host
bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE.

We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pci_host.c
hw/pci_host.h