qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zihan Yang <whois.zihan.yang@gmail.com>
To: qemu-devel@nongnu.org
Cc: marcel.apfelbaum@gmail.com, Zihan Yang <whois.zihan.yang@gmail.com>
Subject: [Qemu-devel] [RFC v2 0/3] pci_expander_brdige: Put pxb-pcie host bridge into separate pci domain
Date: Tue, 12 Jun 2018 17:12:35 +0800	[thread overview]
Message-ID: <1528794755-6229-1-git-send-email-whois.zihan.yang@gmail.com> (raw)

Hi all, after some delay, here is the v2 version of putting pxb host bridge
into separate pci domain.

Currently only q35 host bridge is allocated an item in MCFG table, all pxb
host bridges stay within pci domain 0. This series of patches put each pxb
host bridge in separate pci domain, allocating a new MCFG table item for it.

Users can configure whether to put pxb host bridge into separate domain
or just leave it in pci domain 0 by passing parameter sep_domain(bool) and
domain_nr(uint32_t), they can also specify the maximum desired bus numbers
to reduce MCFG space cost, for example,

    -device pxb-pcie,id=bridge3,bus="pcie.0",sep_domain=on,domain_nr=1,max_bus=130

Then this pxb-pcie host bridge is placed at pci domain 1, and only reserve
(130+1)=131 buses, which is much smaller than the default 256 buses.

The pxb host does not have an mch in it, as q35 host already has one. All
pxb host bridges just serve as expander bridges in QEMU, which makes them
a little simpler than q35 host bridge.

There are some things remaining TODO. For example, deal with the pci data
write to pxb host bridges, but that will need some work in SeaBIOS, which
I am starting soon. Also, we might need to limit the number of pci domains
in case it exceeds the bit limit of physical address when EPT is enabled.

v2 <- v1:
- Allow user to configure whether to put pxb-pcie into seperate domain
- Add AML description part of each host bridge
- Modify the location of MCFG space to between RAM hotplug and pci hole64


Zihan Yang (3):
  pci_expander_bridge: add type TYPE_PXB_PCIE_HOST
  acpi-build: allocate mcfg for pxb-pcie host bridges
  acpi-build: describe new pci domain in AML

 hw/i386/acpi-build.c                        | 162 ++++++++++++++++++++--------
 hw/i386/pc.c                                |  14 ++-
 hw/pci-bridge/pci_expander_bridge.c         | 142 +++++++++++++++++++++++-
 hw/pci-host/q35.c                           |   2 +
 hw/pci/pci.c                                |   9 +-
 include/hw/i386/pc.h                        |   1 +
 include/hw/pci-bridge/pci_expander_bridge.h |   6 ++
 include/hw/pci-host/q35.h                   |   1 +
 include/hw/pci/pci_host.h                   |   2 +-
 9 files changed, 285 insertions(+), 54 deletions(-)
 create mode 100644 include/hw/pci-bridge/pci_expander_bridge.h

-- 
2.7.4

                 reply	other threads:[~2018-06-12  9:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1528794755-6229-1-git-send-email-whois.zihan.yang@gmail.com \
    --to=whois.zihan.yang@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=qemu-devel@nongnu.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).