[libvirt] new libvirt "pci" controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)
Daniel P. Berrange
berrange at redhat.com
Wed Apr 10 09:26:02 UTC 2013
On Tue, Apr 09, 2013 at 04:06:06PM -0400, Laine Stump wrote:
> On 04/09/2013 04:58 AM, Daniel P. Berrange wrote:
> > On Mon, Apr 08, 2013 at 03:32:07PM -0400, Laine Stump wrote:
> > Actually I do wonder if we should reprent a PCI root as two
> > <controller> elements, one representing the actual PCI root
> > device, and the other representing the host bridge that is
> > built-in.
> >
> > Also we should use the actual model names, not 'pci-root' or
> > 'pcie-root' but rather i440FX for "pc" machine type, and whatever
> > the q35 model name is.
> >
> > - One PCI root with built-in PCI bus (ie todays' setup)
> >
> > <controller type="pci-root" index="0">
> > <model name="i440FX"/>
> > </controller>
> > <controller type="pci" index="0"> <!-- Host bridge -->
> > <address type='pci' domain='0' bus='0' slot='0''/>
>
> Isn't this saying that the bridge connects to itself? (since bus 0 is
> this bus)
>
> I understand (again, possibly wrongly) that the builtin PCI bus connects
> to the chipset using its own slot 0 (that's why it's reserved), but
> that's its address on itself. How is this bridge associated with the
> pci-root?
>
> Ah, I *think* I see it - the domain attribute of the pci controller is
> matched to the index of the pci-root controller, correct? But there's
> still something strange about the <address> of the pci controller being
> self-referential.
Yes, the index of the pci-root matches the 'domain' of <address>
> > </controller>
> > <interface type='direct'>
> > ...
> > <address type='pci' domain='0' bus='0' slot='3'/>
> > </controller>
> >
> > - One PCI root with built-in PCI bus and extra PCI bridge
> >
> > <controller type="pci-root" index="0">
> > <model name="i440FX"/>
> > </controller>
> > <controller type="pci" index="0"> <!-- Host bridge -->
> > <address type='pci' domain='0' bus='0' slot='0'/>
> > </controller>
> > <controller type="pci" index="1"> <!-- Additional bridge -->
> > <address type='pci' domain='0' bus='0' slot='1'/>
> > </controller>
> > <interface type='direct'>
> > ...
> > <address type='pci' domain='0' bus='1' slot='3'/>
> > </controller>
> >
> > - One PCI root with built-in PCI bus, PCI-E bus and and extra PCI bridge
> > (ie possible q35 setup)
>
> Why would a q35 machine have an i440FX pci-root?
It shouldn't, that's a typo
>
> >
> > <controller type="pci-root" index="0">
> > <model name="i440FX"/>
> > </controller>
> > <controller type="pci" index="0"> <!-- Host bridge -->
> > <address type='pci' domain='0' bus='0' slot='0'/>
> > </controller>
> > <controller type="pci" index="1"> <!-- Additional bridge -->
> > <address type='pci' domain='0' bus='0' slot='1'/>
> > </controller>
> > <controller type="pci" index="1"> <!-- Additional bridge -->
> > <address type='pci' domain='0' bus='0' slot='1'/>
> > </controller>
>
> I think you did a cut-paste here and intended to change something, but
> didn't - those two bridges are identical.
Yep, the slot should be 2 in the second one
>
> > <interface type='direct'>
> > ...
> > <address type='pci' domain='0' bus='1' slot='3'/>
> > </controller>
> >
> > So if we later allowed for mutiple PCI roots, then we'd have something
> > like
> >
> > <controller type="pci-root" index="0">
> > <model name="i440FX"/>
> > </controller>
> > <controller type="pci-root" index="1">
> > <model name="i440FX"/>
> > </controller>
> > <controller type="pci" index="0"> <!-- Host bridge 1 -->
> > <address type='pci' domain='0' bus='0' slot='0''/>
> > </controller>
> > <controller type="pci" index="0"> <!-- Host bridge 2 -->
> > <address type='pci' domain='1' bus='0' slot='0''/>
> > </controller>
> > <interface type='direct'> <!-- NIC on host bridge 2 -->
> > ...
> > <address type='pci' domain='1' bus='0' slot='3'/>
> > </controller>
> >
> >
> > NB this means that 'index' values can be reused against the
> > <controller>, provided they are setup on different pci-roots.
> >
> >> (also note that it might happen that the bus number in libvirt's config
> >> will correspond to the bus numbering that shows up in the guest OS, but
> >> that will just be a happy coincidence)
> >>
> >> Does this make sense?
> > Yep, I think we're fairly close.
>
> What about the other types of pci controllers that are used by PCIe? We
> should make sure they fit in this model before we settle on it.
What do they do ?
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list