[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v4 4/4] auto-create pci-bridge controller info



On Wed, Mar 06, 2013 at 04:15:28PM +0100, Ján Tomko wrote:
> On 03/05/13 11:36, Daniel P. Berrange wrote:
> > On Mon, Mar 04, 2013 at 02:39:40PM -0500, Laine Stump wrote:
> >> On 03/04/2013 11:51 AM, Ján Tomko wrote:
> >>> It would be nice if we could add pci bridges even when there weren't any
> >>> specified in the XML, but there are too many PCI devices. I don't know
> >>> what would be the nicest way to do that.
> >>
> >> If we auto-assign addresses for un-addressed devices first (your recent
> >> patches did that, right? I forget the status of those), *then*
> >> auto-create the required bridges (which themselves will need an
> >> auto-assigned address), that should just happen.
> >>
> >> Of course, if we do that, then we won't have reserved any slots on bus 0
> >> for even a single pci-bridge device, so we'll fail. Is the proper way
> >> out of this to always reserve one (or maybe two, for good measure) slots
> >> on any given bus to be used only for bridges? That way no matter how out
> >> of hand things get, we'll always have a place we can add another bus.
> >> (In the case of *lots* of devices, I assume that a device on a nested
> >> PCI bridge would be less efficient, and may have some other limitations,
> >> but it would be better than nothing. And if the admin was really
> >> concerned about that, they could modify their config to explicitly place
> >> several bridges directly on bus 0)
> 
> Maybe we could reserve the first bus as well?

I don't think we should artifically reserve anything that isn't
absolutely required by the underlying machine type.

> > You'd have todo a 2 pass assignment. First count the number of devices
> > that need to have PCI addresses assigned. Then create the required
> > number of bridges, then assign the addresses.
> > 
> 
> Which one is better? The reserved slots would make auto-adding bridges
> on hotplug possible, but I fear the code would be too ugly. On the other
> hand, 2-pass assignment sounds really easy to do :)

I think we just do the 2-pass auto-assignment.

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 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]