1. 20 3月, 2014 1 次提交
    • W
      bhyve: host API support · bc93c34e
      Wojciech Macek 提交于
      New functionalities:
      - connectGetMaxVcpus - on bhyve hardcode this value to 16
      - nodeGetFreeMemory - do not use physmem_get on FreeBSD, since
                            it might get wrong value on systems with
                            more than 100GB of RAM
      - nodeGetCPUMap - wrapper only for mapping function, currently not
                        supported by FreeBSD
      - nodeSet/GetMemoryParameters - wrapper only for future improvements,
                                      currently not supported by FreeBSD
      bc93c34e
  2. 18 3月, 2014 1 次提交
  3. 06 2月, 2014 1 次提交
  4. 01 2月, 2014 1 次提交
    • J
      Resolve Coverity dead_error_begin · 5c36e631
      John Ferlan 提交于
      Coverity complains about default: label in libxl_driver.c not be able
      to be reached. It's by design for the code and since it's not necessary
      in the code nor does it elicit any compiler/make check warnings - just
      remove it rather than adding a coverity[dead_error_begin] tag.
      
      While I'm at it, lxc_driver.c and nodeinfo.c have the same design, so I
      removed the default labels and the existing coverity tags.
      5c36e631
  5. 28 1月, 2014 2 次提交
  6. 27 1月, 2014 2 次提交
  7. 23 1月, 2014 1 次提交
  8. 22 1月, 2014 1 次提交
    • B
      linuxNodeGetCPUStats: Correctly handle cpu prefix · 94f82053
      Bing Bu Cao 提交于
      To retrieve node cpu statistics on Linux system, the
      linuxNodeGetCPUstats function simply uses STRPREFIX() to match the cpuid
      with the one read from /proc/stat. However, as the file is read line by
      line it may happen, that some CPUs share the same prefix. So if user
      requested stats for the first CPU, which is offline, then there's no
      cpu1 in the stats file so the one that we match is cpu10. Which is
      obviously wrong. Fortunately, the IDs are terminated by a space, so we
      can utilize that.
      Signed-off-by: NBing Bu Cao <mars@linux.vnet.ibm.com>
      94f82053
  9. 07 1月, 2014 1 次提交
  10. 07 11月, 2013 1 次提交
    • E
      nodeinfo: fix build on non-Linux · adb44955
      Eric Blake 提交于
      Commit b0f85462 broke the build on mingw, by exposing code that
      had Linux-specific dependencies but which was previously protected
      by libnuma ifdef guards:
      
      make[3]: Entering directory `/home/eblake/libvirt-tmp/build/src'
        CC       libvirt_driver_la-nodeinfo.lo
      ../../src/nodeinfo.c: In function 'virNodeGetSiblingsList':
      ../../src/nodeinfo.c:1543:30: error: 'SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX' undeclared (first use in this function)
           if (virFileReadAll(path, SYSFS_THREAD_SIBLINGS_LIST_LENGTH_MAX, &buf) < 0)
                                    ^
      ../../src/nodeinfo.c:1543:30: note: each undeclared identifier is reported only once for each function it appears in
      ../../src/nodeinfo.c: In function 'virNodeCapsFillCPUInfo':
      ../../src/nodeinfo.c:1562:5: error: implicit declaration of function 'virNodeGetCpuValue' [-Werror=implicit-function-declaration]
           if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id,
           ^
      ../../src/nodeinfo.c:1562:5: error: nested extern declaration of 'virNodeGetCpuValue' [-Werror=nested-externs]
      ../../src/nodeinfo.c:1562:35: error: 'SYSFS_CPU_PATH' undeclared (first use in this function)
           if ((tmp = virNodeGetCpuValue(SYSFS_CPU_PATH, cpu_id,
                                         ^
      cc1: all warnings being treated as errors
      
      * src/nodeinfo.c (virNodeCapsFillCPUInfo): Make conditional.
      (virNodeGetSiblingsList): Move into #ifdef linux block.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      adb44955
  11. 04 11月, 2013 8 次提交
  12. 22 10月, 2013 1 次提交
  13. 16 10月, 2013 1 次提交
  14. 09 10月, 2013 1 次提交
  15. 07 10月, 2013 1 次提交
    • R
      nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X · 2d74822a
      Ryota Ozaki 提交于
      This fixes the following error:
        error : nodeGetInfo:933 : this function is not supported
        by the connection driver: node info not implemented on this platform
      
      The freebsdNodeGetCPUCount was renamed to appleFreebsdNodeGetCPUCount
      in order to make more visible the fact, that it works on Mac OS X too.
      
      Mac OS X can use sysctlbyname as same as FreeBSD to get the CPU
      frequency. However, the MIB style name is different from FreeBSD's.
      And the unit of the return frequency is also different.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2d74822a
  16. 22 8月, 2013 1 次提交
  17. 12 7月, 2013 1 次提交
    • H
      nodeinfo: Don't fail on non-contiguous NUMA topologies · 6d986d99
      hejia hejia 提交于
      nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes
      are contiguous and starting from 0. Unfortunately there are machines
      that don't match this assumption:
      
      available: 1 nodes (1)
      node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
      node 1 size: 16340 MB
      node 1 free: 11065 MB
      
      Before this patch:
      error: internal error Failed to query NUMA free memory
      error: internal error Failed to query NUMA free memory for node: 0
      
      After this patch:
      Total: 15772580 KiB
      0: 0 KiB
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      6d986d99
  18. 11 7月, 2013 1 次提交
  19. 10 7月, 2013 2 次提交
  20. 25 6月, 2013 1 次提交
  21. 21 5月, 2013 1 次提交
  22. 10 5月, 2013 1 次提交
  23. 08 5月, 2013 1 次提交
    • D
      Separate internal node device APIs from public API · 1c6d4ca5
      Daniel P. Berrange 提交于
      The individual hypervisor drivers were directly referencing
      APIs in src/nodeinfo.c in their virDriverPtr struct. Separate
      these methods, so there is always a wrapper in the hypervisor
      driver. This allows the unused virConnectPtr args to be
      removed from the nodeinfo.c file. Again this will ensure that
      ACL checks will only be performed on invocations that are
      directly associated with public API usage.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1c6d4ca5
  24. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  25. 04 4月, 2013 2 次提交
  26. 11 3月, 2013 1 次提交
  27. 09 3月, 2013 1 次提交
  28. 24 1月, 2013 2 次提交
    • D
      Ensure nodeinfo struct is initialized to zero · 83b4137d
      Daniel P. Berrange 提交于
      When linuxNodeInfoCPUPopulate() method triggered use of an
      uninitialize value, since it did not initialize the 'sockets'
      field in the virNodeInfoPtr struct:
      
      ==30020== Conditional jump or move depends on uninitialised value(s)
      ==30020==    at 0x5125DBD: linuxNodeInfoCPUPopulate (nodeinfo.c:513)
      ==30020==    by 0x51261A0: nodeGetInfo (nodeinfo.c:884)
      ==30020==    by 0x149B9B10: qemuCapsInit (qemu_capabilities.c:846)
      ==30020==    by 0x14A11B25: qemuCreateCapabilities (qemu_driver.c:424)
      ==30020==    by 0x14A12426: qemuStartup (qemu_driver.c:874)
      ==30020==    by 0x512A7AF: virStateInitialize (libvirt.c:822)
      ==30020==    by 0x40DE04: daemonRunStateInit (libvirtd.c:877)
      ==30020==    by 0x50ADCE5: virThreadHelper (virthreadpthread.c:161)
      ==30020==    by 0x328CA07D14: start_thread (pthread_create.c:308)
      ==30020==    by 0x328C6F246C: clone (clone.S:114)
      (happened twice)
      
              if (socks > nodeinfo->sockets)    <--- here
                  nodeinfo->sockets = socks;
      
      Rather than doing this for each field, just make the caller memset
      the entire struct to zero.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      83b4137d
    • P
      capabilities: Add additional data to the NUMA topology info · 79a003f9
      Peter Krempa 提交于
      This patch adds data gathering to the NUMA gathering files and adds
      support for outputting the data. The test driver and xend driver need to
      be adapted to fill sensible data to the structure in a future patch.
      79a003f9