@@ -1076,6 +1076,19 @@ void pc_guest_info_machine_done(Notifier *notifier, void *data)
PcGuestInfoState *guest_info_state = container_of(notifier,
PcGuestInfoState,
machine_done);
+ PCIHostState *snooped_host = find_i440fx();
+ PCIHostBridgeSnoopedClass *snooped_class =
+ PCI_HOST_BRIDGE_SNOOPED_GET_CLASS(snooped_host);
+ GPtrArray *snooping_hosts = snooped_class->snooping_hosts(snooped_host);
+ int extra_hosts = snooping_hosts->len;
+
+ 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);
}