1. 09 3月, 2013 1 次提交
  2. 08 3月, 2013 1 次提交
  3. 07 3月, 2013 2 次提交
    • D
      Fix crash parsing RNG device specification · 75e656a3
      Daniel P. Berrange 提交于
      Code that validates the whitelist for the RNG device filename
      didn't account for fact that filename may be NULL. This led
      to a NULL reference crash. This wasn't caught since the test
      suite was not covering this XML syntax
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      75e656a3
    • J
      Resolve valgrind error · 1cf4ef1f
      John Ferlan 提交于
      Resolves the following valgrind error from qemuxml2argvtest:
      
      ==20393== 5 bytes in 1 blocks are definitely lost in loss record 2 of 60
      ==20393==    at 0x4A0883C: malloc (vg_replace_malloc.c:270)
      ==20393==    by 0x38D690A167: __vasprintf_chk (in /usr/lib64/libc-2.16.so)
      ==20393==    by 0x4CB0D97: virVasprintf (stdio2.h:210)
      ==20393==    by 0x4CB0E53: virAsprintf (virutil.c:2017)
      ==20393==    by 0x428DC5: qemuAssignDeviceAliases (qemu_command.c:791)
      ==20393==    by 0x41DF93: testCompareXMLToArgvHelper (qemuxml2argvtest.c:151)
      ==20393==    by 0x41F53F: virtTestRun (testutils.c:157)
      ==20393==    by 0x41DA9B: mymain (qemuxml2argvtest.c:885)
      ==20393==    by 0x41FB7A: virtTestMain (testutils.c:719)
      ==20393==    by 0x38D6821A04: (below main) (in /usr/lib64/libc-2.16.so)
      ==20393==
      
      From qemu_command.c/line 791:
      
          if (def->rng) {
              if (virAsprintf(&def->rng->info.alias, "rng%d", 0) < 0)
                  goto no_memory;
          }
      1cf4ef1f
  4. 05 3月, 2013 4 次提交
    • P
      conf: Report errors on cputune parameter parsing · 7fc4864a
      Peter Krempa 提交于
      This patch adds proper error reporting if parsing of cputune parameters
      fails due to incorrect values provided by the user. Previously no errors
      were reported in such a case and the failure was silently ignored.
      7fc4864a
    • P
      conf: Make virDomainDeviceInfoIterate usable without os type · 5d9169e4
      Peter Krempa 提交于
      Make the iterator function usable in the next patches. Also refactor
      some parts to avoid strcmp if not necessary.
      
      This commit tweaks and shadows the change that was done in commit
      babe7dad and was needed after the
      support for multiple console devices was added. Historically the first
      <console> element is alias for the <serial> device.
      5d9169e4
    • P
      conf: whitespace cleanups and refactors with no semantic impact · bb98ba5d
      Peter Krempa 提交于
      This patch changes many unrelated places to simplify the code or update
      code style. This patch should not have any semantic impact on the code.
      bb98ba5d
    • E
      rng: restrict passthrough names to known-good files · 4932ef45
      Eric Blake 提交于
      There is some controversy[1] on the qemu list on whether qemu should
      have ever allowed arbitrary file name passthrough, or whether it
      should be restricted to JUST /dev/random and /dev/hwrng.  It is
      always easier to add support for additional filenames than it is
      to remove support for something once released, so this patch
      restricts libvirt 1.0.3 (where the virtio-random backend was first
      supported) to just the two uncontroversial names, letting us defer
      to a later date any decision on whether supporting arbitrary files
      makes sense. Additionally, since qemu 1.4 does NOT support
      /dev/fdset/nnn fd passthrough for the backend, limiting to just
      two known names means that we don't get tempted to try fd
      passthrough where it won't work.
      
      [1]https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#00023
      
      * src/conf/domain_conf.c (virDomainRNGDefParseXML): Only allow
      /dev/random and /dev/hwrng.
      * docs/schemas/domaincommon.rng: Flag invalid files.
      * docs/formatdomain.html.in (elementsRng): Document this.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args:
      Update test to match.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml:
      Likewise.
      4932ef45
  5. 27 2月, 2013 2 次提交
  6. 26 2月, 2013 1 次提交
  7. 25 2月, 2013 5 次提交
  8. 23 2月, 2013 1 次提交
  9. 22 2月, 2013 2 次提交
  10. 21 2月, 2013 7 次提交
  11. 20 2月, 2013 3 次提交
  12. 12 2月, 2013 2 次提交
  13. 08 2月, 2013 5 次提交
  14. 06 2月, 2013 3 次提交
    • D
      Rename all PCI device functions to have a standard name prefix · 20253560
      Daniel P. Berrange 提交于
      Rename all the pciDeviceXXX and pciXXXDevice APIs to have a
      fixed virPCIDevice name prefix
      20253560
    • D
      Make virDomainObjList self-locking via virObjectLockable · 582c445a
      Daniel P. Berrange 提交于
      Switch virDomainObjList to inherit from virObjectLockable and
      make all the APIs acquire/release the mutex when running. This
      makes virDomainObjList completely self-locking and no longer
      reliant on the hypervisor driver locks
      582c445a
    • D
      Merge virDomainObjListIsDuplicate into virDomainObjListAdd · eea87129
      Daniel P. Berrange 提交于
      The duplicate VM checking should be done atomically with
      virDomainObjListAdd, so shoud not be a separate function.
      Instead just use flags to indicate what kind of checks are
      required.
      
      This pair, used in virDomainCreateXML:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, false)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                         NULL)))
           goto cleanup;
      
      This pair, used in virDomainRestoreFlags:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, true)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                         VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                         NULL)))
           goto cleanup;
      
      This pair, used in virDomainDefineXML:
      
         if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0)
           goto cleanup;
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def, false)))
           goto cleanup;
      
      Changes to
      
         if (!(dom = virDomainObjListAdd(privconn->domains,
                                         privconn->caps,
                                         def,
                                         0, NULL)))
           goto cleanup;
      eea87129
  15. 05 2月, 2013 1 次提交
    • D
      Turn virDomainObjList into an opaque virObject · 37abd471
      Daniel P. Berrange 提交于
      As a step towards making virDomainObjList thread-safe turn it
      into an opaque virObject, preventing any direct access to its
      internals.
      
      As part of this a new method virDomainObjListForEach is
      introduced to replace all existing usage of virHashForEach
      37abd471