pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

Move PCIEPort's "port" property to the new type, same for "aer_log_max".
Move PCIESlot's "chassis" and "slot" properties to the new type.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Andreas Färber 2013-07-12 19:56:00 +02:00
parent 5315dc78d0
commit bcb7575068
5 changed files with 85 additions and 64 deletions

View file

@ -24,8 +24,13 @@
#include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_bus.h"
#define TYPE_PCIE_PORT "pcie-port"
#define PCIE_PORT(obj) OBJECT_CHECK(PCIEPort, (obj), TYPE_PCIE_PORT)
struct PCIEPort {
PCIBridge br;
/*< private >*/
PCIBridge parent_obj;
/*< public >*/
/* pci express switch port */
uint8_t port;
@ -33,8 +38,13 @@ struct PCIEPort {
void pcie_port_init_reg(PCIDevice *d);
#define TYPE_PCIE_SLOT "pcie-slot"
#define PCIE_SLOT(obj) OBJECT_CHECK(PCIESlot, (obj), TYPE_PCIE_SLOT)
struct PCIESlot {
PCIEPort port;
/*< private >*/
PCIEPort parent_obj;
/*< public >*/
/* pci express switch port with slot */
uint8_t chassis;