From: "Michael S. Tsirkin" <mst@redhat.com>
To: Zihan Yang <whois.zihan.yang@gmail.com>
Cc: qemu-devel@nongnu.org, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Subject: Re: [Qemu-devel] [RFC v2 1/3] pci_expander_bridge: add type TYPE_PXB_PCIE_HOST
Date: Wed, 13 Jun 2018 17:46:32 +0300 [thread overview]
Message-ID: <20180613173655-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAKwiv-jJbcuLgygcbSBkaZw33mnamHqa5T15gMNi2CqUNN2mkA@mail.gmail.com>
On Wed, Jun 13, 2018 at 04:23:40PM +0800, Zihan Yang wrote:
> Michael S. Tsirkin <mst@redhat.com> 于2018年6月12日周二 下午9:43写道:
> >
> > On Tue, Jun 12, 2018 at 05:13:22PM +0800, Zihan Yang wrote:
> > > The inner host bridge created by pxb-pcie is TYPE_PXB_PCI_HOST by default,
> > > add a new type TYPE_PXB_PCIE_HOST to better utilize the ECAM of PCIe
> > >
> > > Signed-off-by: Zihan Yang <whois.zihan.yang@gmail.com>
> >
> > I have a concern that there are lots of new properties
> > added here, I'm not sure how are upper layers supposed to
> > manage them all.
> >
> > E.g. bus_nr supplied in several places, domain_nr for which
> > it's not clear how it is supposed to be allocated, etc.
>
> Indeed they seem to double the properties, but the pxb host is
> an internal structure of pxb-pcie device, created in pxb-pcie's
> realization procedure, and acpi-build queries host bridges instead
> of pxb-pcie devices. This means that users can not directly specify
> the property of pxb host bridge, but must 'inherit' from pxb-pcie
> devices. I had thought about changing the acpi-build process,
> but that would require more modifications.
> As for the properties, bus_nr means the start bus number
> of this host bridge. It is used when pxb-pcie is in pci domain 0
> with q35 host to avoid bus number confliction. When it is placed
> in a separate pci domain, it is not used and should be 0.
>
> max_bus means how many buses the user desires, EACH bus in
> PCIe requires 1MB configuration space, thus specifying it could
> reduce the reserved memory in MMCFG as suggested by Marcel.
> Typically, the user can specify
>
> -device pxb-pcie,id=br1,bus="pcie.0",sep_domain=on,domain_nr=1,max_bus=130
>
> this will place the buses under this pxb host bridge in pci domain
> 1, and reserve (130 + 1) = 131 buses for it. The start bus number
> is always 0 currently for simplicity.
>
> > Can the management interface be simplified?
> > Ideally we wouldn't have to teach libvirt new tricks,
> > just generalize pxb support slightly.
>
> We can delete 'sep_domain' property, I just find 'domain_nr'
> already indicates domain number. But domain_nr and
> max_bus seems unremovable, although they look 'redundant'
> because they appear twice.
>
> I'm not familiar with libvirt, but from the perspective of user,
> only 2 properties are added(domain_nr and max_bus, if we
> delete sep_domain), though the internal structure actually has
> changed.
If you want a property for an internal purpose,
you can have a property starting with "x-" this way
we don't commit to maintaining it.
--
MST
next prev parent reply other threads:[~2018-06-13 14:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 9:13 [Qemu-devel] [RFC v2 1/3] pci_expander_bridge: add type TYPE_PXB_PCIE_HOST Zihan Yang
2018-06-12 9:13 ` [Qemu-devel] [RFC v2 3/3] acpi-build: describe new pci domain in AML Zihan Yang
2018-06-20 7:46 ` Marcel Apfelbaum
2018-06-21 16:52 ` Zihan Yang
2018-06-22 16:43 ` Marcel Apfelbaum
2018-06-12 13:43 ` [Qemu-devel] [RFC v2 1/3] pci_expander_bridge: add type TYPE_PXB_PCIE_HOST Michael S. Tsirkin
2018-06-13 8:23 ` Zihan Yang
2018-06-13 14:46 ` Michael S. Tsirkin [this message]
2018-06-14 3:29 ` Zihan Yang
2018-06-20 4:31 ` Marcel Apfelbaum
2018-06-20 6:38 ` Marcel Apfelbaum
2018-06-21 16:46 ` Zihan Yang
[not found] ` <1528794804-6289-2-git-send-email-whois.zihan.yang@gmail.com>
2018-06-20 7:41 ` [Qemu-devel] [RFC v2 2/3] acpi-build: allocate mcfg for pxb-pcie host bridges Marcel Apfelbaum
2018-06-21 16:49 ` Zihan Yang
2018-06-22 16:37 ` Marcel Apfelbaum
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=20180613173655-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=whois.zihan.yang@gmail.com \
/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).