1. 04 2月, 2020 1 次提交
  2. 30 1月, 2020 1 次提交
  3. 29 1月, 2020 1 次提交
  4. 08 1月, 2020 1 次提交
  5. 07 1月, 2020 1 次提交
  6. 21 12月, 2019 1 次提交
  7. 09 12月, 2019 8 次提交
  8. 15 11月, 2019 1 次提交
  9. 12 11月, 2019 2 次提交
  10. 21 10月, 2019 3 次提交
  11. 15 10月, 2019 1 次提交
  12. 09 8月, 2019 1 次提交
    • J
      qemu: Pass correct qemuCaps to virDomainDeviceDefPostParse · b449c270
      Jiri Denemark 提交于
      Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need
      to make sure it gets the capabilities stored in the domain's private
      data if the domain is running. Passing NULL may cause QEMU capabilities
      probing to be triggered in case QEMU binary changed in the meantime.
      When this happens while a running domain object is locked, QMP event
      delivered to the domain before QEMU capabilities probing finishes will
      deadlock the event loop.
      
      QEMU capabilities lookup (via domainPostParseDataAlloc callback) is
      hidden inside virDomainDeviceDefPostParseOne with no way to pass
      qemuCaps to virDomainDeviceDef* functions. This patch fixes all
      remaining paths leading to virDomainDeviceDefPostParse.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      b449c270
  13. 19 6月, 2019 1 次提交
  14. 12 4月, 2019 1 次提交
  15. 20 2月, 2019 1 次提交
    • E
      domain: Fix unknown flags diagnosis in virDomainGetXMLDesc · 27c8fd74
      Eric Blake 提交于
      Many drivers had a comment that they did not validate the incoming
      'flags' to virDomainGetXMLDesc() because they were relying on
      virDomainDefFormat() to do it instead. This used to be the case
      (at least since 461e0f1a and friends in 0.9.4 added unknown flag
      checking in general), but regressed in commit 0ecd6851 (1.2.12),
      when all of the drivers were changed to pass 'flags' through the
      new helper virDomainDefFormatConvertXMLFlags(). Since this helper
      silently ignores unknown flags, we need to implement flag checking
      in each driver instead.
      
      Annoyingly, this means that any new flag values added will silently
      be ignored when targeting an older libvirt, rather than our usual
      practice of loudly diagnosing an unsupported flag.  Add comments
      in domain_conf.[ch] to remind us to be extra vigilant about the
      impact when adding flags (a new flag to add data is safe if the
      older server omitting the requested data doesn't break things in
      the newer client; a new flag to suppress data rather than enhancing
      the existing VIR_DOMAIN_XML_SECURE may form a data leak or even a
      security hole).
      
      In the qemu driver, there are multiple callers all funnelling to
      qemuDomainDefFormatBufInternal(); many of them already validated
      flags (and often only a subset of the full set of possible flags),
      but for ease of maintenance, we can also check flags at the common
      helper function.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      27c8fd74
  16. 09 1月, 2019 1 次提交
  17. 14 12月, 2018 3 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  18. 20 9月, 2018 2 次提交
  19. 23 7月, 2018 1 次提交
    • A
      src: Make virStr*cpy*() functions return an int · 6c0d0210
      Andrea Bolognani 提交于
      Currently, the functions return a pointer to the
      destination buffer on success or NULL on failure.
      
      Not only does this kind of error handling look quite
      alien in the context of libvirt, where most functions
      return zero on success and a negative int on failure,
      but it's also somewhat pointless because unless there's
      been a failure the returned pointer will be the same
      one passed in by the user, thus offering no additional
      value.
      
      Change the functions so that they return an int
      instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      6c0d0210
  20. 04 5月, 2018 1 次提交
    • J
      conf: Clean up object referencing for Add and Remove · b04629b6
      John Ferlan 提交于
      When adding a new object to the domain object list, there should
      have been 2 virObjectRef calls made one for each list into which
      the object was placed to match the 2 virObjectUnref calls that
      would occur during Remove as part of virHashRemoveEntry when
      virObjectFreeHashData is called when the element is removed from
      the hash table as set up in virDomainObjListNew.
      
      Some drivers (libxl, lxc, qemu, and vz) handled this inconsistency
      by calling virObjectRef upon successful return from virDomainObjListAdd
      in order to use virDomainObjEndAPI when done with the returned @vm.
      While others (bhyve, openvz, test, and vmware) handled this via only
      calling virObjectUnlock upon successful return from virDomainObjListAdd.
      
      This patch will "unify" the approach to use virDomainObjEndAPI
      for any @vm successfully returned from virDomainObjListAdd.
      
      Because list removal is so tightly coupled with list addition,
      this patch fixes the list removal algorithm to return the object
      as entered - "locked and reffed".  This way, the callers can then
      decide how to uniformly handle add/remove success and failure.
      This removes the onus on the caller to "specially handle" the
      @vm during removal processing.
      
      The Add/Remove logic allows for some logic simplification such
      as in libxl where we can Remove the @vm directly rather than
      needing to set a @remove_dom boolean and removing after the
      libxlDomainObjEndJob completes as the @vm is locked/reffed.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      b04629b6
  21. 24 4月, 2018 1 次提交
  22. 23 4月, 2018 2 次提交
  23. 18 4月, 2018 1 次提交
  24. 16 4月, 2018 2 次提交
  25. 12 4月, 2018 1 次提交