[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC V2 13/17] hw/pci: inform bios if the system has
From: |
Marcel Apfelbaum |
Subject: |
[Qemu-devel] [PATCH RFC V2 13/17] hw/pci: inform bios if the system has more than one pci bridge |
Date: |
Mon, 16 Feb 2015 11:54:13 +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>
---
hw/i386/pc.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e07f1fa..9ef0917 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1073,9 +1073,22 @@ typedef struct PcGuestInfoState {
static
void pc_guest_info_machine_done(Notifier *notifier, void *data)
{
+ PCIHostState *host;
+ int hosts = 0;
PcGuestInfoState *guest_info_state = container_of(notifier,
PcGuestInfoState,
machine_done);
+ HOST_BRIDGE_FOREACH(host) {
+ hosts++;
+ }
+
+ if (hosts && guest_info_state->info.fw_cfg) {
+ uint64_t *val = g_malloc(sizeof(*val));
+ *val = cpu_to_le64(hosts - 1);
+ fw_cfg_add_file(guest_info_state->info.fw_cfg,
+ "etc/extra-pci-roots", val, sizeof(*val));
+ }
+
acpi_setup(&guest_info_state->info);
}
--
2.1.0
- [Qemu-devel] [PATCH RFC V2 00/17] hw/pc: implement multiple primary busses for pc machines, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 08/17] hw/pci: made pci_bus_num a PCIBusClass method, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 06/17] hw/pci: move pci bus related code to separate files, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 11/17] hw/pci: implement iteration over multiple host bridges, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 12/17] hw/pci: introduce PCI Expander Bridge (PXB), Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 07/17] hw/pci: made pci_bus_is_root a PCIBusClass method, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 13/17] hw/pci: inform bios if the system has more than one pci bridge,
Marcel Apfelbaum <=
- [Qemu-devel] [PATCH RFC V2 09/17] hw/pci: introduce TYPE_PCI_MAIN_HOST_BRIDGE interface, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 05/17] hw/acpi: remove from root bus 0 the crs resources used by other busses., Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 15/17] hw/pxb: add map_irq func, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 16/17] hw/pci_bus: add support for NUMA nodes, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 10/17] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 03/17] hw/apci: add _PRT method for extra root busses, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 01/17] acpi: added needed acpi constructs, Marcel Apfelbaum, 2015/02/16
- [Qemu-devel] [PATCH RFC V2 04/17] hw/acpi: add _CRS method for extra root busses, Marcel Apfelbaum, 2015/02/16