1. 22 8月, 2017 4 次提交
    • P
      conf: error out for multiple log elements while parsing chardev · 23482e4b
      Pavel Hrdina 提交于
      Remove check whether a variable was already set because the element
      is parsed only once now.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      23482e4b
    • P
      conf: error out for multiple source elements while parsing chardev · 21bfd1e9
      Pavel Hrdina 提交于
      Currently we accept and correctly parse this chardev XML:
      
        ...
        <channel type='tcp'>
          <source mode='connect'/>
          <source mode='bind' host='localhost'/>
          <source service='4567'/>
          <target type='virtio' name='test'/>
        </channel>
        ...
      
      The parsed formatted XML is:
      
        ...
        <channel type='tcp'>
          <source mode='connect' host='localhost' service='4567'/>
          <target type='virtio' name='test'/>
        </channel>
        ...
      
      That behavior is super wrong and should not be allowed.  If you notice
      the current parse takes the first found attribute and uses that value,
      so for example from the "<source mode='bind' host='localhost'/>" only
      the "host" attribute is used.  It works the same way for all possible
      attributes that we are able to parse for source element.
      
      This patch enforces providing only one source element for all character
      devices, only for UDP type we allow to provide two source elements
      since you can specify both modes.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      21bfd1e9
    • P
      conf: switch from while to for loop for chardev parsing · 7d0ff943
      Pavel Hrdina 提交于
      This removes one level of indentation.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      7d0ff943
    • J
      conf: useserial: drop useless check for serial devices · bad14fbb
      Ján Tomko 提交于
      Since its introduction in commit 874e65aa, if someone requests:
      <os><bios useserial="yes"/><os/>
      we report an error if we cannot successfully count the number
      of serial devices via an XPath query.
      
      Instead of fixing the check (and moving it to the validation phase,
      to prevent existing domains from disappearing), drop it completely.
      For QEMU, the number of serials is checked when building the command
      line.
      bad14fbb
  2. 21 8月, 2017 2 次提交
  3. 18 8月, 2017 4 次提交
    • P
      conf: add infrastructure for tolerating certain post parse callback failures · 7c5cf498
      Peter Krempa 提交于
      Some failures of the post parse callback can be tolerated. This is
      specifically desired when loading the configs of existing VMs. In such
      case the post parse callback should not really be modifying anything
      in the definition.
      
      This patch adds a parse flag VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL
      which will allow the callbacks to report non-fatal failures by returning
      a positive return value. In such case the field 'postParseFailed' in the
      domain definition is set to true, to notify the drivers that the
      callback failed and possibly needs to be re-run.
      7c5cf498
    • P
      conf: Return any non-zero value from virDomainDeviceInfoIterateInternal callback · e159ddfa
      Peter Krempa 提交于
      Post parse callbacks will need to be able to signal that they failed
      non-fatally. This means that we need to return the value returned by the
      callback without modification.
      e159ddfa
    • P
      conf: Add callbacks that allocate per-def private data · e168bc8a
      Peter Krempa 提交于
      Some drivers use def-specific private data across callbacks (e.g.
      qemuCaps in the qemu driver). Currently it's mostly allocated in every
      single callback. This is rather wasteful, given that every single call
      to the device callback allocates it.
      
      The new callback will allocate the data (if not provided externally) and
      then use it for the VM, address and device post parse callbacks.
      e168bc8a
    • P
      conf: Add 'basic' post parse callback · 2f19c932
      Peter Krempa 提交于
      Add yet another post parse callback, which is executed prior the real
      one without @parseOpaque. This is meant to set basics before
      @parseOpaque (in case of the qemu driver qemuCaps) can be allocated.
      
      This callback will allow to optimize passing of custom parseOpaque
      through the callbacks.
      2f19c932
  4. 17 8月, 2017 8 次提交
  5. 14 8月, 2017 7 次提交
  6. 10 8月, 2017 1 次提交
  7. 08 8月, 2017 1 次提交
  8. 07 8月, 2017 2 次提交
  9. 03 8月, 2017 1 次提交
  10. 02 8月, 2017 9 次提交
  11. 25 7月, 2017 1 次提交