From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVN8z-0004dW-Kc for qemu-devel@nongnu.org; Tue, 10 Mar 2015 12:36:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVN8y-0001G0-Sn for qemu-devel@nongnu.org; Tue, 10 Mar 2015 12:36:33 -0400 Date: Tue, 10 Mar 2015 17:36:10 +0100 From: "Michael S. Tsirkin" Message-ID: <20150310173521-mutt-send-email-mst@redhat.com> References: <1426001534-7151-1-git-send-email-marcel@redhat.com> <1426001534-7151-22-git-send-email-marcel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426001534-7151-22-git-send-email-marcel@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 for-2.3 21/28] hw/pci: inform bios if the system has more than one pci bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: kraxel@redhat.com, quintela@redhat.com, seabios@seabios.org, qemu-devel@nongnu.org, agraf@suse.de, alex.williamson@redhat.com, kevin@koconnor.net, qemu-ppc@nongnu.org, hare@suse.de, imammedo@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net On Tue, Mar 10, 2015 at 05:32:07PM +0200, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > 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 Again it's not the right thing to do for extra root complexes, only works for PXB. > --- > hw/i386/pc.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index ae3ef0a..71d2f5b 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -1072,9 +1072,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