1. 09 5月, 2017 2 次提交
  2. 07 4月, 2017 1 次提交
  3. 27 3月, 2017 3 次提交
  4. 04 2月, 2016 1 次提交
    • J
      conf: add net device prefix to capabilities · 819d1d94
      Joao Martins 提交于
      In the reverted commit d2e5538b, the libxl driver was changed to copy
      interface names autogenerated by libxl to the corresponding network def
      in the domain's virDomainDef object. The copied name is freed when the
      domain transitions to the shutoff state. But when migrating a domain,
      the autogenerated name is included in the XML sent to the destination
      host.  It is possible an interface with the same name already exists on
      the destination host, causing migration to fail.
      
      This patch defines a new capability for setting the network device
      prefix that will be used in the driver. Valid prefixes are
      VIR_NET_GENERATED_PREFIX or the one announced by the driver.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      819d1d94
  5. 26 9月, 2015 1 次提交
    • S
      conf: Add new VIR_DOMAIN_VIRT_NONE enum · 62569e45
      Shivangi Dhir 提交于
      Introduce VIR_DOMAIN_VIRT_NONE to give domaintype the default value of zero.
      This is specially helpful in constructing better error messages
      when we don't want to look up the default emulator by virtType.
      
      The test data in vircapstest.c is also modified to reflect this change.
      62569e45
  6. 15 6月, 2015 1 次提交
    • M
      virCapabilitiesDomainDataLookup: Produce saner error message · f8867012
      Michal Privoznik 提交于
      During a review, I've noticed this error message that was eventually
      produced when I was trying to define a domain:
      
      error: invalid argument: could not find capabilities for arch=mips64el
      domaintype=(null)
      
      Look at the (null). Why is it there? Well, during XML parsing, we try
      to look up the default emulator for given OS type and possibly virt
      type too. And this is the problem, because if we don't want to look up
      by virt type, a -1 is passed to note this fact. Later, the code
      handles -1 just right. Except for error message. When it is
      constructed (in a very fabulous way I must say), the value is compared
      to zero, not -1. And since we don't have any translation from -1 to a
      virt type string, we just print (null).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f8867012
  7. 12 5月, 2015 2 次提交
  8. 08 5月, 2015 1 次提交
    • C
      caps: Fix regression defaulting to host arch · 8910e063
      Cole Robinson 提交于
      My commit 747761a7 (v1.2.15 only) dropped this bit of logic when filling
      in a default arch in the XML:
      
      -    /* First try to find one matching host arch */
      -    for (i = 0; i < caps->nguests; i++) {
      -        if (caps->guests[i]->ostype == ostype) {
      -            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
      -                if (caps->guests[i]->arch.domains[j]->type == domain &&
      -                    caps->guests[i]->arch.id == caps->host.arch)
      -                    return caps->guests[i]->arch.id;
      -            }
      -        }
      -    }
      
      That attempt to match host.arch is important, otherwise we end up
      defaulting to i686 on x86_64 host for KVM, which is not intended.
      Duplicate it in the centralized CapsLookup function.
      
      Additionally add some testcases that would have caught this.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1219191
      8910e063
  9. 27 4月, 2015 1 次提交
  10. 21 4月, 2015 7 次提交
  11. 14 1月, 2015 1 次提交
    • D
      Decouple CPU XML formatting from domain XML public API flags · e34473c1
      Daniel P. Berrange 提交于
      The virCPUDefFormat* methods were relying on the VIR_DOMAIN_XML_*
      flag definitions. It is not desirable for low level internal
      functions to be coupled to flags for the public API, since they
      may need to be called from several different contexts where the
      flags would not be appropriate.
      e34473c1
  12. 25 12月, 2014 1 次提交
  13. 15 11月, 2014 1 次提交
  14. 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
  15. 03 7月, 2014 1 次提交
    • J
      Report errors in virCapabilitiesFormatXML · 28b9be24
      Ján Tomko 提交于
      So far, we only report an error if formatting the siblings bitmap
      in NUMA topology fails.
      
      Be consistent and always report error in virCapabilitiesFormatXML.
      28b9be24
  16. 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
  17. 06 6月, 2014 1 次提交
  18. 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
  19. 25 3月, 2014 1 次提交
  20. 14 3月, 2014 1 次提交
    • L
      conf: eliminate hardcoded indentation in capabilities xml · 75f0b66c
      Laine Stump 提交于
      There were a lot of changes here, but all very mechanical. For some
      reason, the virBufferPtr had been named "xml" instead of "buf" in this
      file, so since the indentation changing touched almost every line
      using the buffer, I took this chance to change its name for "buf" for
      consistency with every other file.
      75f0b66c
  21. 11 2月, 2014 2 次提交
    • J
      Rename 'index' in virCapabilitiesGetCpusForNode · 47fa97a7
      Ján Tomko 提交于
      This shadows the index function on some systems (RHEL-6.4, FreeBSD 9):
      ../../src/conf/capabilities.c: In function 'virCapabilitiesGetCpusForNode':
      ../../src/conf/capabilities.c:1005: warning: declaration of'index'
            shadows a global declaration [-Wshadow]
      /usr/include/strings.h:57: warning: shadowed declaration is here [-Wshadow]
      47fa97a7
    • P
      Handle non-sequential NUMA node numbers · cd921cf0
      Pradipta Kr. Banerjee 提交于
      On some platforms like IBM PowerNV the NUMA node numbers can be
      non-sequential. For eg. numactl --hardware o/p from such a machine looks
      as given below
      
      node distances:
         node   0   1  16  17
           0:  10  40  40  40
           1:  40  10  40  40
          16:  40  40  10  40
          17:  40  40  40  10
      
      The NUMA nodes are 0,1,16,17
      
      Libvirt uses sequential index as NUMA node numbers and this can
      result in crash or incorrect results.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
      Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com>
      cd921cf0
  22. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: conf · 6f4901e1
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/conf/capabilities.c: Consistently use commas.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/network_conf.c: Likewise.
      * src/conf/storage_conf.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6f4901e1
  23. 04 11月, 2013 1 次提交
  24. 29 10月, 2013 1 次提交
    • G
      capabilities: add baselabel per sec driver/virt type to secmodel · b51038a4
      Giuseppe Scrivano 提交于
      Expand the "secmodel" XML fragment of "host" with a sequence of
      baselabel's which describe the default security context used by
      libvirt with a specific security model and virtualization type:
      
      <secmodel>
        <model>selinux</model>
        <doi>0</doi>
        <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
        <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
      </secmodel>
      <secmodel>
        <model>dac</model>
        <doi>0</doi>
        <baselabel type='kvm'>107:107</baselabel>
        <baselabel type='qemu'>107:107</baselabel>
      </secmodel>
      
      "baselabel" is driver-specific information, e.g. in the DAC security
      model, it indicates USER_ID:GROUP_ID.
      Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b51038a4
  25. 18 7月, 2013 1 次提交
    • P
      caps: Add helpers to convert NUMA nodes to corresponding CPUs · b8b38321
      Peter Krempa 提交于
      These helpers use the remembered host capabilities to retrieve the cpu
      map rather than query the host again. The intended usage for this
      helpers is to fix automatic NUMA placement with strict memory alloc. The
      code doing the prepare needs to pin the emulator process only to cpus
      belonging to a subset of NUMA nodes of the host.
      b8b38321
  26. 11 7月, 2013 1 次提交
  27. 01 7月, 2013 1 次提交
  28. 23 5月, 2013 1 次提交
  29. 21 5月, 2013 1 次提交