From 277e9340e6a1b0a0e8e988d2f0ac82b18b695c0b Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 24 Jul 2013 18:56:11 +0300 Subject: 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 Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/pci-host/piix.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/pci-host') 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) { -- cgit v1.2.3