1. 04 6月, 2014 1 次提交
    • M
      virCaps: Expose distance between host NUMA nodes · 8ba0a58f
      Michal Privoznik 提交于
      If user or management application wants to create a guest,
      it may be useful to know the cost of internode latencies
      before the guest resources are pinned. For example:
      
      <capabilities>
      
        <host>
          ...
          <topology>
            <cells num='2'>
              <cell id='0'>
                <memory unit='KiB'>4004132</memory>
                <distances>
                  <sibling id='0' value='10'/>
                  <sibling id='1' value='20'/>
                </distances>
                <cpus num='2'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                  <cpu id='2' socket_id='0' core_id='2' siblings='2'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4030064</memory>
                <distances>
                  <sibling id='0' value='20'/>
                  <sibling id='1' value='10'/>
                </distances>
                <cpus num='2'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                  <cpu id='3' socket_id='0' core_id='2' siblings='3'/>
                </cpus>
              </cell>
            </cells>
          </topology>
          ...
        </host>
        ...
      </capabilities>
      
      We can see the distance from node1 to node0 is 20 and within nodes 10.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8ba0a58f
  2. 22 4月, 2014 1 次提交
  3. 25 3月, 2014 2 次提交
  4. 18 3月, 2014 1 次提交
  5. 29 1月, 2014 1 次提交
    • J
      xen: fix parsing xend http response · 37564b47
      Jim Fehlig 提交于
      Commit df36af58 broke parsing of http response from xend.  The prior
      use of atoi() would happily parse e.g. a string containing "200 OK\r\n",
      whereas virStrToLong_i() will fail when called with a NULL end_ptr.
      Change the calls to virStrToLong_i() to provide a non-NULL end_ptr.
      37564b47
  6. 05 12月, 2013 1 次提交
    • P
      maint: Kill usage of atoi() · df36af58
      Peter Krempa 提交于
      Kill the use of atoi() and introduce syntax check to forbid it and it's
      friends (atol, atoll, atof, atoq).
      
      Also fix a typo in variable name holding the cylinders count of a disk
      pool (apparently unused).
      
      examples/domsuspend/suspend.c will need a larger scale refactor as the
      whole example file is broken thus it will be exempted from the syntax
      check for now.
      df36af58
  7. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: xen · 86f6748b
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/libxl/libxl_driver.c: Consistently use commas.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * src/xenapi/xenapi_driver.c: Likewise.
      * src/xenapi/xenapi_utils.c: Likewise.
      * src/xenxs/xen_sxpr.c: Likewise.
      * src/xenxs/xen_xm.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      86f6748b
  8. 26 9月, 2013 1 次提交
  9. 06 8月, 2013 1 次提交
    • J
      xen: fix memory corruption in legacy driver · 0e671a16
      Jim Fehlig 提交于
      Commit 632180d1 introduced memory corruption in xenDaemonListDefinedDomains
      by starting to populate the names array at index -1, causing all sorts
      of havoc in libvirtd such as aborts like the following
      
      *** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x00007fffe00ccf20 ***
      ======= Backtrace: =========
      /lib64/libc.so.6(+0x7abf6)[0x7ffff3fa0bf6]
      /lib64/libc.so.6(+0x7b973)[0x7ffff3fa1973]
      /lib64/libc.so.6(xdr_array+0xde)[0x7ffff403cbae]
      /usr/sbin/libvirtd(+0x50251)[0x5555555a4251]
      /lib64/libc.so.6(xdr_free+0x15)[0x7ffff403ccd5]
      /usr/lib64/libvirt.so.0(+0x1fad34)[0x7ffff76b1d34]
      /usr/lib64/libvirt.so.0(virNetServerProgramDispatch+0x1fc)[0x7ffff76b16f1]
      /usr/lib64/libvirt.so.0(+0x1f214a)[0x7ffff76a914a]
      /usr/lib64/libvirt.so.0(+0x1f222d)[0x7ffff76a922d]
      /usr/lib64/libvirt.so.0(+0xbcc4f)[0x7ffff7573c4f]
      /usr/lib64/libvirt.so.0(+0xbc5e5)[0x7ffff75735e5]
      /lib64/libpthread.so.0(+0x7e0f)[0x7ffff48f7e0f]
      /lib64/libc.so.6(clone+0x6d)[0x7ffff400e7dd]
      
      Fix by initializing ret to 0 and only setting to error on failure path.
      0e671a16
  10. 01 8月, 2013 1 次提交
  11. 11 7月, 2013 1 次提交
  12. 10 7月, 2013 1 次提交
  13. 23 5月, 2013 1 次提交
  14. 21 5月, 2013 12 次提交
    • D
      Convert Xen domain core dump driver methods to use virDomainDefPtr · fa9b8b04
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain coredump
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      fa9b8b04
    • D
      Convert Xen domain stats/peek driver methods to use virDomainDefPtr · 89d819f2
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain stats &
      peek APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      89d819f2
    • D
      Convert Xen domain scheduler driver methods to use virDomainDefPtr · f6e95ac0
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain scheduler
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f6e95ac0
    • D
      Convert Xen domain autostart driver methods to use virDomainDefPtr · d305e869
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain autostart
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d305e869
    • D
      Convert Xen domain device hotplug driver methods to use virDomainDefPtr · 21213a4b
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain hotplug
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      21213a4b
    • D
      Convert Xen domain VCPU driver methods to use virDomainDefPtr · 95e18efd
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain VCPU
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      95e18efd
    • D
      Convert Xen domain create/define/getxml/migration APIs to use virDomainDefPtr · 18b14012
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain create, migrate,
      getxml, & define APIs to simplify introduction of ACL security
      checks. The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      18b14012
    • D
      Convert Xen domain managed save driver methods to use virDomainDefPtr · 0a6fc8ab
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain save
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0a6fc8ab
    • D
      Convert Xen domain property driver methods to use virDomainDefPtr · 249fbea0
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain property
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      249fbea0
    • D
      Convert Xen domain lifecycle driver methods to use virDomainDefPtr · f547c520
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain lifecycle
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f547c520
    • D
      Convert Xen domain lookup driver methods to use virDomainDefPtr · 5ed5783b
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain lookup
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5ed5783b
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  15. 09 5月, 2013 14 次提交