qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: seabios@seabios.org
Cc: marcel@redhat.com, kevin@koconnor.net, lersek@redhat.com,
	qemu-devel@nongnu.org, mst@redhat.com
Subject: [Qemu-devel] [PATCH] pci: fixes to allow booting from extra root pci buses.
Date: Thu, 11 Jun 2015 15:41:35 +0300	[thread overview]
Message-ID: <1434026495-30485-1-git-send-email-marcel@redhat.com> (raw)

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 <marcel@redhat.com>
---
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

             reply	other threads:[~2015-06-11 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 12:41 Marcel Apfelbaum [this message]
2015-06-11 12:45 ` [Qemu-devel] [PATCH] pci: fixes to allow booting from extra root pci buses Michael S. Tsirkin
2015-06-11 12:51   ` Marcel Apfelbaum
2015-06-11 13:02     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434026495-30485-1-git-send-email-marcel@redhat.com \
    --to=marcel@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).