1. 21 4月, 2015 1 次提交
    • C
      caps: Add virCapabilitiesDomainDataLookup · a6936523
      Cole Robinson 提交于
      This is a helper function to look up all capabilities data for all
      the OS bits that are relevant to <domain>. This is
      
      - os type
      - arch
      - domain type
      - emulator
      - machine type
      
      This will be used to replace several functions in later commits.
      a6936523
  2. 14 7月, 2014 1 次提交
    • E
      capabilities: use bool instead of int · 58156f39
      Eric Blake 提交于
      While preparing to add a capability for active commit, I noticed
      that the existing code was abusing int for boolean values.
      
      * src/conf/capabilities.h (_virCapsGuestFeature, _virCapsHost)
      (virCapabilitiesNew, virCapabilitiesAddGuestFeature): Improve
      types.
      * src/conf/capabilities.c (virCapabilitiesNew)
      (virCapabilitiesAddGuestFeature): Adjust signature.
      * src/bhyve/bhyve_capabilities.c (virBhyveCapsBuild): Update
      clients.
      * src/esx/esx_driver.c (esxCapsInit): Likewise.
      * src/libxl/libxl_conf.c (libxlMakeCapabilities): Likewise.
      * src/lxc/lxc_conf.c (virLXCDriverCapsInit): Likewise.
      * src/openvz/openvz_conf.c (openvzCapsInit): Likewise.
      * src/parallels/parallels_driver.c (parallelsBuildCapabilities):
      Likewise.
      * src/phyp/phyp_driver.c (phypCapsInit): Likewise.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInit)
      (virQEMUCapsInitGuestFromBinary): Likewise.
      * src/security/virt-aa-helper.c (get_definition): Likewise.
      * src/test/test_driver.c (testBuildCapabilities): Likewise.
      * src/uml/uml_conf.c (umlCapsInit): Likewise.
      * src/vbox/vbox_tmpl.c (vboxCapsInit): Likewise.
      * src/vmware/vmware_conf.c (vmwareCapsInit): Likewise.
      * src/xen/xen_hypervisor.c (xenHypervisorBuildCapabilities):
      Likewise.
      * src/xenapi/xenapi_driver.c (getCapsObject): Likewise.
      * tests/qemucaps2xmltest.c (testGetCaps): Likewise.
      * tests/testutils.c (virTestGenericCapsInit): Likewise.
      * tests/testutilslxc.c (testLXCCapsInit): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Likewise.
      * tests/testutilsxen.c (testXenCapsInit): Likewise.
      * tests/vircaps2xmltest.c (buildVirCapabilities): Likewise.
      * tests/vircapstest.c (buildNUMATopology): Likewise.
      * tests/vmx2xmltest.c (testCapsInit): Likewise.
      * tests/xml2vmxtest.c (testCapsInit): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      58156f39
  3. 19 6月, 2014 1 次提交
    • M
      virCaps: expose pages info · 02129b7c
      Michal Privoznik 提交于
      There are two places where you'll find info on page sizes. The first
      one is under <cpu/> element, where all supported pages sizes are
      listed. Then the second one is under each <cell/> element which refers
      to concrete NUMA node. At this place, the size of page's pool is
      reported. So the capabilities XML looks something like this:
      
      <capabilities>
      
        <host>
          <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid>
          <cpu>
            <arch>x86_64</arch>
            <model>Westmere</model>
            <vendor>Intel</vendor>
            <topology sockets='1' cores='1' threads='1'/>
            ...
            <pages unit='KiB' size='4'/>
            <pages unit='KiB' size='2048'/>
            <pages unit='KiB' size='1048576'/>
          </cpu>
          ...
          <topology>
            <cells num='4'>
              <cell id='0'>
                <memory unit='KiB'>4054408</memory>
                <pages unit='KiB' size='4'>1013602</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4071072</memory>
                <pages unit='KiB' size='4'>1017768</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                </cpus>
              </cell>
              ...
            </cells>
          </topology>
          ...
        </host>
      
        <guest/>
      
      </capabilities>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      02129b7c
  4. 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
  5. 25 3月, 2014 1 次提交
  6. 12 2月, 2014 1 次提交
    • J
      Fix leaks in vircapstest · 5b0dc11d
      Ján Tomko 提交于
      Coverity complains about cell_cpus being leaked on error
      and valgrind shows 'caps' is leaked on success.
      
      Introduced in eb64e875.
      5b0dc11d
  7. 11 2月, 2014 1 次提交