thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
9ae3a8
From 8b91f65b26d0dd19fe47ba4ffea86081657fadf9 Mon Sep 17 00:00:00 2001
9ae3a8
From: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Date: Wed, 6 Nov 2013 14:41:16 +0100
9ae3a8
Subject: [PATCH 40/81] pci-host: Consistently set cannot_instantiate_with_device_add_yet
9ae3a8
9ae3a8
RH-Author: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Message-id: <1383748882-22831-12-git-send-email-kwolf@redhat.com>
9ae3a8
Patchwork-id: 55537
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 11/17] pci-host: Consistently set cannot_instantiate_with_device_add_yet
9ae3a8
Bugzilla: 1001216
9ae3a8
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
Many PCI host bridges consist of a sysbus device and a PCI device.
9ae3a8
You need both for the thing to work.  Arguably, these bridges should
9ae3a8
be modelled as a single, composite devices instead of pairs of
9ae3a8
seemingly independent devices you can only use together, but we're not
9ae3a8
there, yet.
9ae3a8
9ae3a8
Since the sysbus part can't be instantiated with device_add, yet,
9ae3a8
permitting it with the PCI part is useless.  We shouldn't offer
9ae3a8
useless options to the user, so let's set
9ae3a8
cannot_instantiate_with_device_add_yet for them.
9ae3a8
9ae3a8
It's already set for Bonito, grackle, i440FX, and raven.  Document
9ae3a8
why.
9ae3a8
9ae3a8
Set it for the others: dec-21154, e500-host-bridge, gt64120_pci, mch,
9ae3a8
pbm-pci, ppc4xx-host-bridge, sh_pci_host, u3-agp, uni-north-agp,
9ae3a8
uni-north-internal-pci, uni-north-pci, and versatile_pci_host.
9ae3a8
9ae3a8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
9ae3a8
(cherry picked from pending upstream submission)
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
---
9ae3a8
 hw/mips/gt64xxx_pci.c   |  6 ++++++
9ae3a8
 hw/pci-host/apb.c       |  6 ++++++
9ae3a8
 hw/pci-host/bonito.c    |  6 +++++-
9ae3a8
 hw/pci-host/dec.c       |  6 ++++++
9ae3a8
 hw/pci-host/grackle.c   |  6 +++++-
9ae3a8
 hw/pci-host/piix.c      |  6 +++++-
9ae3a8
 hw/pci-host/ppce500.c   |  5 +++++
9ae3a8
 hw/pci-host/prep.c      |  6 +++++-
9ae3a8
 hw/pci-host/q35.c       |  5 +++++
9ae3a8
 hw/pci-host/uninorth.c  | 24 ++++++++++++++++++++++++
9ae3a8
 hw/pci-host/versatile.c |  6 ++++++
9ae3a8
 hw/ppc/ppc4xx_pci.c     |  5 +++++
9ae3a8
 hw/sh4/sh_pci.c         |  6 ++++++
9ae3a8
 13 files changed, 89 insertions(+), 4 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/mips/gt64xxx_pci.c   |    6 ++++++
9ae3a8
 hw/pci-host/apb.c       |    6 ++++++
9ae3a8
 hw/pci-host/bonito.c    |    6 +++++-
9ae3a8
 hw/pci-host/dec.c       |    6 ++++++
9ae3a8
 hw/pci-host/grackle.c   |    6 +++++-
9ae3a8
 hw/pci-host/piix.c      |    6 +++++-
9ae3a8
 hw/pci-host/ppce500.c   |    5 +++++
9ae3a8
 hw/pci-host/prep.c      |    6 +++++-
9ae3a8
 hw/pci-host/q35.c       |    5 +++++
9ae3a8
 hw/pci-host/uninorth.c  |   24 ++++++++++++++++++++++++
9ae3a8
 hw/pci-host/versatile.c |    6 ++++++
9ae3a8
 hw/ppc/ppc4xx_pci.c     |    5 +++++
9ae3a8
 hw/sh4/sh_pci.c         |    6 ++++++
9ae3a8
 13 files changed, 89 insertions(+), 4 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
9ae3a8
index 189e865..3813495 100644
9ae3a8
--- a/hw/mips/gt64xxx_pci.c
9ae3a8
+++ b/hw/mips/gt64xxx_pci.c
9ae3a8
@@ -1150,12 +1150,18 @@ static int gt64120_pci_init(PCIDevice *d)
9ae3a8
 static void gt64120_pci_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init = gt64120_pci_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_MARVELL;
9ae3a8
     k->device_id = PCI_DEVICE_ID_MARVELL_GT6412X;
9ae3a8
     k->revision = 0x10;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo gt64120_pci_info = {
9ae3a8
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
9ae3a8
index 5ac7556..a296dcf 100644
9ae3a8
--- a/hw/pci-host/apb.c
9ae3a8
+++ b/hw/pci-host/apb.c
9ae3a8
@@ -557,11 +557,17 @@ static int pbm_pci_host_init(PCIDevice *d)
9ae3a8
 static void pbm_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init = pbm_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_SUN;
9ae3a8
     k->device_id = PCI_DEVICE_ID_SUN_SABRE;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo pbm_pci_host_info = {
9ae3a8
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
9ae3a8
index c2a056a..021e652 100644
9ae3a8
--- a/hw/pci-host/bonito.c
9ae3a8
+++ b/hw/pci-host/bonito.c
9ae3a8
@@ -811,8 +811,12 @@ static void bonito_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->revision = 0x01;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
     dc->desc = "Host bridge";
9ae3a8
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
9ae3a8
     dc->vmsd = &vmstate_bonito;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo bonito_info = {
9ae3a8
diff --git a/hw/pci-host/dec.c b/hw/pci-host/dec.c
9ae3a8
index cff458b..aebb240 100644
9ae3a8
--- a/hw/pci-host/dec.c
9ae3a8
+++ b/hw/pci-host/dec.c
9ae3a8
@@ -116,6 +116,7 @@ static int dec_21154_pci_host_init(PCIDevice *d)
9ae3a8
 static void dec_21154_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init = dec_21154_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_DEC;
9ae3a8
@@ -123,6 +124,11 @@ static void dec_21154_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->revision = 0x02;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_PCI;
9ae3a8
     k->is_bridge = 1;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo dec_21154_pci_host_info = {
9ae3a8
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
9ae3a8
index 4643beb..315965d 100644
9ae3a8
--- a/hw/pci-host/grackle.c
9ae3a8
+++ b/hw/pci-host/grackle.c
9ae3a8
@@ -130,7 +130,11 @@ static void grackle_pci_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->device_id = PCI_DEVICE_ID_MOTOROLA_MPC106;
9ae3a8
     k->revision  = 0x00;
9ae3a8
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
9ae3a8
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo grackle_pci_info = {
9ae3a8
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
9ae3a8
index 20cc682..56fc7be 100644
9ae3a8
--- a/hw/pci-host/piix.c
9ae3a8
+++ b/hw/pci-host/piix.c
9ae3a8
@@ -618,8 +618,12 @@ static void i440fx_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->revision = 0x02;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
     dc->desc = "Host bridge";
9ae3a8
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
9ae3a8
     dc->vmsd = &vmstate_i440fx;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo i440fx_info = {
9ae3a8
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
9ae3a8
index 0d0a001..2dcd668 100644
9ae3a8
--- a/hw/pci-host/ppce500.c
9ae3a8
+++ b/hw/pci-host/ppce500.c
9ae3a8
@@ -387,6 +387,11 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->device_id = PCI_DEVICE_ID_MPC8533E;
9ae3a8
     k->class_id = PCI_CLASS_PROCESSOR_POWERPC;
9ae3a8
     dc->desc = "Host bridge";
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo e500_host_bridge_info = {
9ae3a8
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
9ae3a8
index cdb401f..3e94d07 100644
9ae3a8
--- a/hw/pci-host/prep.c
9ae3a8
+++ b/hw/pci-host/prep.c
9ae3a8
@@ -196,7 +196,11 @@ static void raven_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
     dc->desc = "PReP Host Bridge - Motorola Raven";
9ae3a8
     dc->vmsd = &vmstate_raven;
9ae3a8
-    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo raven_info = {
9ae3a8
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
9ae3a8
index 5f8e7ff..ed934c3 100644
9ae3a8
--- a/hw/pci-host/q35.c
9ae3a8
+++ b/hw/pci-host/q35.c
9ae3a8
@@ -295,6 +295,11 @@ static void mch_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->device_id = PCI_DEVICE_ID_INTEL_Q35_MCH;
9ae3a8
     k->revision = MCH_HOST_BRIDGE_REVISION_DEFUALT;
9ae3a8
     k->class_id = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo mch_info = {
9ae3a8
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
9ae3a8
index fff235d..defdaa5 100644
9ae3a8
--- a/hw/pci-host/uninorth.c
9ae3a8
+++ b/hw/pci-host/uninorth.c
9ae3a8
@@ -351,12 +351,18 @@ static int unin_internal_pci_host_init(PCIDevice *d)
9ae3a8
 static void unin_main_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init      = unin_main_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_APPLE;
9ae3a8
     k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_PCI;
9ae3a8
     k->revision  = 0x00;
9ae3a8
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo unin_main_pci_host_info = {
9ae3a8
@@ -369,12 +375,18 @@ static const TypeInfo unin_main_pci_host_info = {
9ae3a8
 static void u3_agp_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init      = u3_agp_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_APPLE;
9ae3a8
     k->device_id = PCI_DEVICE_ID_APPLE_U3_AGP;
9ae3a8
     k->revision  = 0x00;
9ae3a8
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo u3_agp_pci_host_info = {
9ae3a8
@@ -387,12 +399,18 @@ static const TypeInfo u3_agp_pci_host_info = {
9ae3a8
 static void unin_agp_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init      = unin_agp_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_APPLE;
9ae3a8
     k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_AGP;
9ae3a8
     k->revision  = 0x00;
9ae3a8
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo unin_agp_pci_host_info = {
9ae3a8
@@ -405,12 +423,18 @@ static const TypeInfo unin_agp_pci_host_info = {
9ae3a8
 static void unin_internal_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init      = unin_internal_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_APPLE;
9ae3a8
     k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_I_PCI;
9ae3a8
     k->revision  = 0x00;
9ae3a8
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo unin_internal_pci_host_info = {
9ae3a8
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
9ae3a8
index 2f996d9..76d6cce 100644
9ae3a8
--- a/hw/pci-host/versatile.c
9ae3a8
+++ b/hw/pci-host/versatile.c
9ae3a8
@@ -467,11 +467,17 @@ static int versatile_pci_host_init(PCIDevice *d)
9ae3a8
 static void versatile_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init = versatile_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_XILINX;
9ae3a8
     k->device_id = PCI_DEVICE_ID_XILINX_XC2VP30;
9ae3a8
     k->class_id = PCI_CLASS_PROCESSOR_CO;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo versatile_pci_host_info = {
9ae3a8
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
9ae3a8
index 599539b..ebe7efe 100644
9ae3a8
--- a/hw/ppc/ppc4xx_pci.c
9ae3a8
+++ b/hw/ppc/ppc4xx_pci.c
9ae3a8
@@ -380,6 +380,11 @@ static void ppc4xx_host_bridge_class_init(ObjectClass *klass, void *data)
9ae3a8
     k->vendor_id    = PCI_VENDOR_ID_IBM;
9ae3a8
     k->device_id    = PCI_DEVICE_ID_IBM_440GX;
9ae3a8
     k->class_id     = PCI_CLASS_BRIDGE_OTHER;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo ppc4xx_host_bridge_info = {
9ae3a8
diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c
9ae3a8
index d213a90..f9c49c1 100644
9ae3a8
--- a/hw/sh4/sh_pci.c
9ae3a8
+++ b/hw/sh4/sh_pci.c
9ae3a8
@@ -150,10 +150,16 @@ static int sh_pci_host_init(PCIDevice *d)
9ae3a8
 static void sh_pci_host_class_init(ObjectClass *klass, void *data)
9ae3a8
 {
9ae3a8
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
9ae3a8
+    DeviceClass *dc = DEVICE_CLASS(klass);
9ae3a8
 
9ae3a8
     k->init = sh_pci_host_init;
9ae3a8
     k->vendor_id = PCI_VENDOR_ID_HITACHI;
9ae3a8
     k->device_id = PCI_DEVICE_ID_HITACHI_SH7751R;
9ae3a8
+    /*
9ae3a8
+     * PCI-facing part of the host bridge, not usable without the
9ae3a8
+     * host-facing part, which can't be device_add'ed, yet.
9ae3a8
+     */
9ae3a8
+    dc->cannot_instantiate_with_device_add_yet = true;
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo sh_pci_host_info = {
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8