• L
    conf: add new <model> subelement with name attribute to <controller> · bf202510
    Laine Stump 提交于
    This new subelement is used in PCI controllers: the toplevel
    *attribute* "model" of a controller denotes what kind of PCI
    controller is being described, e.g. a "dmi-to-pci-bridge",
    "pci-bridge", or "pci-root". But in the future there will be different
    implementations of some of those types of PCI controllers, which
    behave similarly from libvirt's point of view (and so should have the
    same model), but use a different device in qemu (and present
    themselves as a different piece of hardware in the guest). In an ideal
    world we (i.e. "I") would have thought of that back when the pci
    controllers were added, and used some sort of type/class/model
    notation (where class was used in the way we are now using model, and
    model was used for the actual manufacturer's model number of a
    particular family of PCI controller), but that opportunity is long
    past, so as an alternative, this patch allows selecting a particular
    implementation of a pci controller with the "name" attribute of the
    <model> subelement, e.g.:
    
      <controller type='pci' model='dmi-to-pci-bridge' index='1'>
        <model name='i82801b11-bridge'/>
      </controller>
    
    In this case, "dmi-to-pci-bridge" is the kind of controller (one that
    has a single PCIe port upstream, and 32 standard PCI ports downstream,
    which are not hotpluggable), and the qemu device to be used to
    implement this kind of controller is named "i82801b11-bridge".
    
    Implementing the above now will allow us in the future to add a new
    kind of dmi-to-pci-bridge that doesn't use qemu's i82801b11-bridge
    device, but instead uses something else (which doesn't yet exist, but
    qemu people have been discussing it), all without breaking existing
    configs.
    
    (note that for the existing "pci-bridge" type of PCI controller, both
    the model attribute and <model> name are 'pci-bridge'. This is just a
    coincidence, since it turns out that in this case the device name in
    qemu really is a generic 'pci-bridge' rather than being the name of
    some real-world chip)
    bf202510
libvirt_private.syms 55.1 KB