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? > > 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 :) Jan -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list