summaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-07-24 18:56:11 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-10-14 17:48:52 +0300
commit277e9340e6a1b0a0e8e988d2f0ac82b18b695c0b (patch)
tree1f930db0bb407e26a7fe7ca74e81b074db252cd0 /hw/pci-host
parentf854ecc79957e588bed8ed7e8c1c24ded55fc1e9 (diff)
downloadqemu-277e9340e6a1b0a0e8e988d2f0ac82b18b695c0b.tar.gz
piix: APIs for pc guest info
This adds APIs that will be used to fill in guest acpi tables. Some required information is still lacking in QOM, so we fall back on lookups by type and returning explicit types. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/piix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index c041149320..bad3953fb5 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -416,6 +416,14 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state,
return b;
}
+PCIBus *find_i440fx(void)
+{
+ PCIHostState *s = OBJECT_CHECK(PCIHostState,
+ object_resolve_path("/machine/i440fx", NULL),
+ TYPE_PCI_HOST_BRIDGE);
+ return s ? s->bus : NULL;
+}
+
/* PIIX3 PCI to ISA bridge */
static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq)
{