From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31rG-0001BX-3F for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z31rB-0004u5-4z for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:45:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31rA-0004tV-W2 for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:45:17 -0400 Date: Thu, 11 Jun 2015 14:45:13 +0200 From: "Michael S. Tsirkin" Message-ID: <20150611144345-mutt-send-email-mst@redhat.com> References: <1434026495-30485-1-git-send-email-marcel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434026495-30485-1-git-send-email-marcel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] pci: fixes to allow booting from extra root pci buses. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: kevin@koconnor.net, seabios@seabios.org, lersek@redhat.com, qemu-devel@nongnu.org On Thu, Jun 11, 2015 at 03:41:35PM +0300, Marcel Apfelbaum wrote: > The PXB device exposes a new pci root bridge with the > fw path: /pci-root@4/..., in which 4 is the root bus number. > Before this patch the fw path was wrongly computed: > /pci-root@1/pci@i0cf8/... > Fix the above issues: Correct the bus number and remove the > extra host bridge description. > > Signed-off-by: Marcel Apfelbaum I would like a unit test for various paths, they are part of guest ABI so we can never change them. Could you add a unit test please? Also can you please quote the open firmware spec text that says this is the correct format? > --- > Laszlo worked on supporting pxb for OVMF and discovered > that there is a problem when booting devices from a PXB. > > This is a link to the latest QEMU series: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg302493.html > > Thanks, > Marcel > > src/boot.c | 1 - > src/hw/pci.c | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/boot.c b/src/boot.c > index ec59c37..a3bb13b 100644 > --- a/src/boot.c > +++ b/src/boot.c > @@ -114,7 +114,6 @@ build_pci_path(char *buf, int max, const char *devname, struct pci_device *pci) > } else { > if (pci->rootbus) > p += snprintf(p, max, "/pci-root@%x", pci->rootbus); > - p += snprintf(p, buf+max-p, "%s", FW_PCI_DOMAIN); > } > > int dev = pci_bdf_to_dev(pci->bdf), fn = pci_bdf_to_fn(pci->bdf); > diff --git a/src/hw/pci.c b/src/hw/pci.c > index 0379b55..9e77af4 100644 > --- a/src/hw/pci.c > +++ b/src/hw/pci.c > @@ -133,7 +133,7 @@ pci_probe_devices(void) > if (bus != lastbus) > rootbuses++; > lastbus = bus; > - rootbus = rootbuses; > + rootbus = bus; > if (bus > MaxPCIBus) > MaxPCIBus = bus; > } else { > -- > 2.1.0