[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/28] hw/pci: inform bios if the system has extra pc
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 18/28] hw/pci: inform bios if the system has extra pci root buses |
Date: |
Thu, 4 Jun 2015 13:11:07 +0200 |
From: Marcel Apfelbaum <address@hidden>
The bios looks for 'etc/extra-pci-roots' to decide if
is going to scan further buses after bus 0 tree.
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Acked-by: Laszlo Ersek <address@hidden>
---
hw/i386/pc.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 1eb1db0..a93972f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -30,6 +30,7 @@
#include "hw/block/fdc.h"
#include "hw/ide.h"
#include "hw/pci/pci.h"
+#include "hw/pci/pci_bus.h"
#include "monitor/monitor.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/timer/hpet.h"
@@ -1119,6 +1120,25 @@ void pc_guest_info_machine_done(Notifier *notifier, void
*data)
PcGuestInfoState *guest_info_state = container_of(notifier,
PcGuestInfoState,
machine_done);
+ PCIBus *bus = find_i440fx();
+
+ if (bus) {
+ int extra_hosts = 0;
+
+ QLIST_FOREACH(bus, &bus->child, sibling) {
+ /* look for expander root buses */
+ if (pci_bus_is_root(bus)) {
+ extra_hosts++;
+ }
+ }
+ if (extra_hosts && guest_info_state->info.fw_cfg) {
+ uint64_t *val = g_malloc(sizeof(*val));
+ *val = cpu_to_le64(extra_hosts);
+ fw_cfg_add_file(guest_info_state->info.fw_cfg,
+ "etc/extra-pci-roots", val, sizeof(*val));
+ }
+ }
+
acpi_setup(&guest_info_state->info);
}
--
MST
- [Qemu-devel] [PULL 08/28] hw/pci: made pci_bus_is_root a PCIBusClass method, (continued)
- [Qemu-devel] [PULL 08/28] hw/pci: made pci_bus_is_root a PCIBusClass method, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 09/28] hw/pci: made pci_bus_num a PCIBusClass method, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 10/28] hw/i386: query only for q35/pc when looking for pci host bridge, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 11/28] hw/pci: extend PCI config access to support devices behind PXB, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 12/28] hw/acpi: add support for i440fx 'snooping' root busses, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 13/28] hw/apci: add _PRT method for extra PCI root busses, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 14/28] hw/acpi: add _CRS method for extra root busses, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 15/28] hw/acpi: remove from root bus 0 the crs resources used by other buses., Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 16/28] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 17/28] hw/pci: introduce PCI Expander Bridge (PXB), Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 18/28] hw/pci: inform bios if the system has extra pci root buses,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 19/28] hw/pxb: add map_irq func, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 20/28] hw/pci: add support for NUMA nodes, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 21/28] hw/pxb: add numa_node parameter, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 22/28] apci: fix PXB behaviour if used with unsupported BIOS, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 24/28] pc-dimm: don't assert if pc-dimm alignment != hotpluggable mem range size, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 23/28] docs: Add PXB documentation, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 25/28] hw/acpi: acpi_pm1_cnt_init(): take "disable_s3" and "disable_s4", Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 26/28] hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 27/28] hw/acpi: piix4_pm_init(): take fw_cfg object no more, Michael S. Tsirkin, 2015/06/04
- [Qemu-devel] [PULL 28/28] vhost: logs sharing, Michael S. Tsirkin, 2015/06/04