libvirt/docs/schemas
Laine Stump 4d100c7a41 conf: permit auto-assignment of controller indexes
Hand-entering indexes for 20 PCI controllers is not as tedious as
manually determining and entering their PCI addresses, but it's still
annoying, and the algorithm for determining the proper index is
incredibly simple (in all cases except one) - just pick the lowest
unused index.

The one exception is USB2 controllers because multiple controllers in
the same group have the same index. For these we look to see if 1) the
most recently added USB controller is also a USB2 controller, and 2)
the group *that* controller belongs to doesn't yet have a controller
of the exact model we're just now adding - if both are true, the new
controller gets the same index, but in all other cases we just assign
the lowest unused index.

With this patch in place and combined with the automatic PCI address
assignment, we can define a PCIe switch with several ports like this:

  <controller type='pci' model='pcie-root-port'/>
  <controller type='pci' model='pcie-switch-upstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  <controller type='pci' model='pcie-switch-downstream-port'/>
  ...

These will each get a unique index, and PCI addresses that connect
them together appropriately with no pesky numbers required.
2016-05-25 15:00:25 -04:00
..
basictypes.rng conf: allow type='pci' addresses with no address attributes specified 2016-05-20 13:54:25 -04:00
capability.rng domain: conf: Drop unused OSTYPE_AIX 2015-04-29 09:42:26 -04:00
domain.rng conf: set up for per-grammar overrides in schemas 2014-04-15 21:07:59 +02:00
domaincaps.rng domaincaps: Report video modelType 2016-05-09 16:05:31 -04:00
domaincommon.rng conf: permit auto-assignment of controller indexes 2016-05-25 15:00:25 -04:00
domainsnapshot.rng conf: split <disk> schema into more pieces 2014-04-16 10:45:55 +02:00
interface.rng interface: allow multiple IPv4 addresses + dhcp on a single interface 2015-05-22 10:14:01 -04:00
network.rng schema: Fix interface link state schema 2015-03-03 09:43:13 +01:00
networkcommon.rng schema: rename uint8range/uint24range to uint8/uint24 2016-04-14 14:00:33 -04:00
nodedev.rng schemas: Update nodedev schema to match reality 2016-05-02 15:46:23 +02:00
nwfilter.rng schema: rename uint8range/uint24range to uint8/uint24 2016-04-14 14:00:33 -04:00
secret.rng schemas: finish virTristate{Bool,Switch} transition 2014-09-17 16:10:26 +02:00
storagecommon.rng storage: conf: Don't set any default <mode> in the XML 2015-05-25 20:52:55 -04:00
storagepool.rng conf: Add storage pool device attribute part_separator 2016-01-19 13:02:59 -05:00
storagevol.rng storage: unify permission formatting 2014-12-16 15:47:56 +01:00