[libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

Roman Bogorodskiy bogorodskiy at gmail.com
Sat May 17 18:33:52 UTC 2014


  Ján Tomko wrote:

> > +    for (i = 0; i < def->ncontrollers; i++) {
> > +        if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
> > +            if (def->controllers[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
> > +                continue;
> > +            if (def->controllers[i]->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT)
> > +                continue;
> > +
> > +            if (virDomainPCIAddressReserveNextSlot(addrs,
> > +                                                   &def->controllers[i]->info,
> > +                                                   VIR_PCI_CONNECT_TYPE_PCI) < 0)
> > +                goto error;
> > +        }
> 
> I think unsupported controllers don't need PCI slots.

I've been thinking about that and appears that block could be dropped
completely. The only controller we explicitly operate with is of type
'PCI'. 

Possible models for pci controllers are: pci-root, pcie-root,
pci-bridge and dmi-to-pci-bridge.

Bhyve only supports pci-root that doesn't need an address. So appears
this block of code should be dropped?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140517/5b7c0284/attachment-0001.sig>


More information about the libvir-list mailing list