1. 10 8月, 2015 3 次提交
    • L
      conf: add new <target> subelement with chassisNr attribute to <controller> · 8dc88aee
      Laine Stump 提交于
      There are some configuration options to some types of pci controllers
      that are currently automatically derived from other parts of the
      controller's configuration. For example, in qemu a pci-bridge
      controller has an option that is called "chassis_nr"; up until now
      libvirt has always set chassis_nr to the index of the pci-bridge. So
      this:
      
        <controller type='pci' model='pci-bridge' index='2'/>
      
      will always result in:
      
        -device pci-bridge,chassis_nr=2,...
      
      on the qemu commandline. In the future we may decide there is a better
      way to derive that option, but even in that case we will need for
      existing domains to retain the same chassis_nr they were using in the
      past - that is something that is visible to the guest so it is part of
      the guest ABI and changing it would lead to problems for migrating
      guests (or just guests with very picky OSes).
      
      The <target> subelement has been added as a place to put the new
      "chassisNr" attribute that will be filled in by libvirt when it
      auto-generates the chassisNr; it will be saved in the config, then
      reused any time the domain is started:
      
        <controller type='pci' model='pci-bridge' index='2'>
          <model type='pci-bridge'/>
          <target chassisNr='2'/>
        </controller>
      
      The one oddity of all this is that if the controller configuration
      is changed (for example to change the index or the pci address
      where the controller is plugged in), the items in <target> will
      *not* be re-generated, which might lead to conflict. I can't
      really see any way around this, but fortunately if there is a
      material conflict qemu will let us know and we will pass that on
      to the user.
      8dc88aee
    • L
      qemu: implement <model> subelement to <controller> · 572ebdbc
      Laine Stump 提交于
      This patch provides qemu support for the contents of <model> in
      <controller> for the two existing PCI controller types that need it
      (i.e. the two controller types that are backed by a device that must
      be specified on the qemu commandline):
      
      1) pci-bridge - sets <model> name attribute default as "pci-bridge"
      
      2) dmi-to-pci-bridge - sets <model> name attribute default as
         "i82801b11-bridge".
      
      These both match current hardcoded practice.
      
      The defaults are set at the end of qemuDomainAssignPCIAddresses().
      This can't be done earlier because some of the options that will be
      autogenerated need full PCI address info for the controller, and
      because qemuDomainAssignPCIAddresses() might create extra controllers
      which would need default settings added, and that hasn't yet been done
      at the time the PostParse callbacks are being run.
      qemuDomainAssignPCIAddresses() is still called prior to the XML being
      written to disk, though, so the autogenerated defaults are persistent.
      
      qemu capabilities bits aren't checked when the domain is defined, but
      rather when the commandline is actually created (so the domain can
      possibly be defined on a host that doesn't yet have support for the
      given device, or a host different from the one where it will
      eventually be run). When the commandline is being generated we compare
      the modelName to known qemu device names implementing the given type
      of controller, and check the capabilities bit for that device.
      572ebdbc
    • 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
  2. 09 8月, 2015 1 次提交
    • L
      conf: more useful error message when pci function is out of range · f8fe8f03
      Laine Stump 提交于
      If a pci address had a function number out of range, the error message
      would be:
      
        Insufficient specification for PCI address
      
      which is logged by virDevicePCIAddressParseXML() after
      virDevicePCIAddressIsValid returns a failure.
      
      This patch enhances virDevicePCIAddressIsValid() to optionally report
      the error itself (since it is the place that decides which part of the
      address is "invalid"), and uses that feature when calling from
      virDevicePCIAddressParseXML(), so that the error will be more useful,
      e.g.:
      
        Invalid PCI address function=0x8, must be <= 7
      
      Previously, virDevicePCIAddressIsValid didn't check for the
      theoretical limits of domain or bus, only for slot or function. While
      adding log messages, we also correct that ommission. (The RNG for PCI
      addresses already enforces this limit, which by the way means that we
      can't add any negative tests for this - as far as I know our
      domainschematest has no provisions for passing XML that is supposed to
      fail).
      
      Note that virDevicePCIAddressIsValid() can only check against the
      absolute maximum attribute values for *any* possible PCI controller,
      not for the actual maximums of the specific controller that this
      device is attaching to; fortunately there is later more specific
      validation for guest-side PCI addresses when building the set of
      assigned PCI addresses. For host-side PCI addresses (e.g. for
      <hostdev> and for network device pools), we rely on the error that
      will be logged when it is found that the device doesn't actually
      exist.
      
      This resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=1004596
      f8fe8f03
  3. 07 8月, 2015 3 次提交
  4. 06 8月, 2015 6 次提交
  5. 05 8月, 2015 6 次提交
    • P
      qemu: Forbid image pre-creation for non-shared storage migration · 6da3b694
      Peter Krempa 提交于
      Libvirt doesn't reliably know the location of the backing chain when
      pre-creating images for non-shared migration. This isn't a problem for
      full copy, but incremental copy requires the information.
      
      Forbid pre-creating the image in cases where incremental migration is
      required. This limitation can perhaps be lifted once libvirt will fully
      support loading of backing chain information from the XML.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249587
      6da3b694
    • A
      cpu: Indentation changes in the ppc64 driver · 4ff3e939
      Andrea Bolognani 提交于
      4ff3e939
    • A
      cpu: Rename {powerpc,ppc} => ppc64 (internal symbols) · 3d151589
      Andrea Bolognani 提交于
      Update the names of the symbols used internally by the driver.
      
      No functional changes.
      3d151589
    • A
      cpu: Rename {powerpc,ppc} => ppc64 (exported symbols) · e89733c4
      Andrea Bolognani 提交于
      Only the symbols exported by the driver have been updated;
      the driver implementation itself still uses the old names
      internally.
      
      No functional changes.
      e89733c4
    • A
      cpu: Rename {powerpc,ppc} => ppc64 (filesystem) · ef770f01
      Andrea Bolognani 提交于
      The driver only supports VIR_ARCH_PPC64 and VIR_ARCH_PPC64LE.
      
      Just shuffling files around and updating the build system
      accordingly. No functional changes.
      ef770f01
    • J
      conf: Resolve Coverity FORWARD_NULL · a16871fe
      John Ferlan 提交于
      The recent changes to perform SCSI device address checks during the
      post parse callbacks ran afoul of the Coverity checker since the changes
      assumed that the 'xmlopt' parameter to virDomainDeviceDefPostParse
      would be non NULL (commit id 'ca2cf74e'); however, what was missed
      is there was an "if (xmlopt &&" check being made, so Coverity believed
      that it could be possible for a NULL 'xmlopt'.
      
      Checking the various calling paths seemingly disproves that. If called
      from virDomainDeviceDefParse, there were two other possible calls that
      would end up dereffing, so that path could not be NULL. If called via
      virDomainDefPostParseDeviceIterator via virDomainDefPostParse there
      are two callers (virDomainDefParseXML and qemuParseCommandLine)
      which deref xmlopt either directly or through another call.
      
      So I'm removing the check for non-NULL xmlopt.
      a16871fe
  6. 04 8月, 2015 12 次提交
  7. 03 8月, 2015 6 次提交
  8. 31 7月, 2015 2 次提交
  9. 30 7月, 2015 1 次提交