1. 19 2月, 2015 1 次提交
    • J
      Search for schemas and cpu_map.xml in source tree · bc6e2063
      Jiri Denemark 提交于
      Not all files we want to find using virFileFindResource{,Full} are
      generated when libvirt is built, some of them (such as RNG schemas) are
      distributed with sources. The current API was not able to find source
      files if libvirt was built in VPATH.
      
      Both RNG schemas and cpu_map.xml are distributed in source tarball.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      bc6e2063
  2. 04 2月, 2015 1 次提交
    • O
      cpu: add Freescale ppc64 CPU models · 5a1998d3
      Olivia Yin 提交于
      With this patch, Freescale ppc64 CPU modesl could be recognized.
      
      virsh # cpu-models ppc64
      POWERPC_e6500
      POWERPC_e5500
      power8
      power8e
      power7+
      power7
      power6
      POWER8_v1.0
      POWER7+_v2.1
      POWER7_v2.3
      POWER7_v2.1
      POWER7
      
      virsh # capabilities
      <capabilities>
        <host>
          <uuid>5a54efa6-20dc-4da7-b271-0b7fb7062cb8</uuid>
          <cpu>
            <arch>ppc64</arch>
            <model>POWERPC_e6500</model>
            <vendor>Freescale</vendor>
      5a1998d3
  3. 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
  4. 12 1月, 2015 1 次提交
  5. 04 12月, 2014 1 次提交
    • P
      cpu: fix possible crash in getModels · 4a4cff58
      Pavel Hrdina 提交于
      Commit 86a15a25 introduced a new cpu driver API 'getModels'. Public API
      allow you to pass NULL for models to get only number of existing models.
      However the new code will crash with segfault so we have to count with
      the possibility that the user wants only the number.
      
      There is also difference in order of the models gathered by this new API
      as the old approach was inserting the elements to the end of the array
      so we should use 'VIR_APPEND_ELEMENT'.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      4a4cff58
  6. 03 12月, 2014 1 次提交
    • D
      cpu-driver: Fix the cross driver function call · 86a15a25
      Daniel Hansel 提交于
      For Intel and PowerPC the implementation is calling a cpu driver
      function across driver layers (i.e. from qemu driver directly to cpu
      driver).
      The correct behavior is to use libvirt API functionality to perform such
      a inter-driver call.
      
      This patch introduces a new cpu driver API function getModels() to
      retrieve the cpu models. The currect implementation to process the
      cpu_map XML content is transferred to the INTEL and PowerPC cpu driver
      specific API functions.
      Additionally processing the cpu_map XML file is not safe due to the fact
      that the cpu map does not exist for all architectures. Therefore it is
      better to encapsulate the processing in the architecture specific cpu
      drivers.
      Signed-off-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Reviewed-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      86a15a25
  7. 07 11月, 2014 3 次提交
  8. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in helpers · ff99c791
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/conf/nwfilter_conf.c: Fix initialization.
      * src/cpu/cpu_x86.c: Likewise.
      * src/interface/interface_backend_netcf.c: Likewise.
      * src/locking/lock_daemon.c: Likewise.
      * src/locking/lock_driver_lockd.c: Likewise.
      * src/locking/lock_driver_sanlock.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c: Likewise.
      * src/rpc/virnetserver.c: Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxGenSecurityLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ff99c791
  9. 30 9月, 2014 1 次提交
  10. 18 9月, 2014 1 次提交
  11. 05 9月, 2014 1 次提交
  12. 04 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in conf and friends · ff78ff7c
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on code shared between multiple drivers.
      
      * src/conf/domain_conf.c (virDomainFSDefParseXML)
      (virSysinfoParseXML, virDomainNetDefParseXML)
      (virDomainWatchdogDefParseXML)
      (virDomainRedirFilterUSBDevDefParseXML): Correct use of {}.
      * src/conf/interface_conf.c (virInterfaceDefParseDhcp)
      (virInterfaceDefParseIp, virInterfaceVlanDefFormat)
      (virInterfaceDefParseStartMode, virInterfaceDefParseBondMode)
      (virInterfaceDefParseBondMiiCarrier)
      (virInterfaceDefParseBondArpValid): Likewise.
      * src/conf/node_device_conf.c (virNodeDevCapStorageParseXML):
      Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterRuleDetailsParse)
      (virNWFilterRuleParse, virNWFilterDefParseXML): Likewise.
      * src/conf/secret_conf.c (secretXMLParseNode): Likewise.
      * src/cpu/cpu_x86.c (x86Baseline, x86FeatureLoad, x86ModelLoad):
      Likewise.
      * src/network/bridge_driver.c (networkKillDaemon)
      (networkDnsmasqConfContents): Likewise.
      * src/node_device/node_device_hal.c (dev_refresh): Likewise.
      * src/nwfilter/nwfilter_gentech_driver.c (virNWFilterInstantiate):
      Likewise.
      * src/nwfilter/nwfilter_ebiptables_driver.c
      (_iptablesCreateRuleInstance): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskBuildPool): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ff78ff7c
  13. 28 8月, 2014 1 次提交
  14. 03 7月, 2014 1 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
  15. 02 7月, 2014 1 次提交
  16. 27 6月, 2014 1 次提交
  17. 26 6月, 2014 2 次提交
  18. 20 6月, 2014 1 次提交
    • M
      cpu_arm: Support all ARM processors we know about · d06d4c95
      Michal Privoznik 提交于
      So far three ARM processor families are known to libvirt,
      however the cpu driver knows only about one of them. This
      make host initialization on the other two fail:
      
      2014-06-17 13:35:41.419+0000: 6840: info : libvirt version: 1.2.6
      2014-06-17 13:35:41.419+0000: 6840: error : cpuNodeData:342 : this function is not supported by the connection driver: cannot get node CPU data for armv6l architecture
      2014-06-17 13:35:41.433+0000: 6840: warning : virQEMUCapsInit:943 : Failed to get host CPU
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d06d4c95
  19. 03 6月, 2014 1 次提交
    • J
      cpu: use typedefs for enums in "src/cpu/cpu_map.h" · 5443b158
      Julio Faracco 提交于
      In "src/cpu/" there are some enumerations (enum) declarations.
      Similar to the recent cleanup to "src/util", "src/conf" and other
      directories, it's better to use a typedef for variable types,
      function types and other usages. Other enumeration and folders will
      be changed to typedef's in the future. Specially, in files that are
      in different places of "src/util" and "src/conf". Most of the files
      changed in this commit are related to CPU (cpu_map.h) enums.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      5443b158
  20. 12 5月, 2014 1 次提交
  21. 06 5月, 2014 1 次提交
  22. 25 4月, 2014 1 次提交
  23. 11 4月, 2014 2 次提交
  24. 25 3月, 2014 1 次提交
  25. 18 3月, 2014 1 次提交
  26. 12 3月, 2014 1 次提交
  27. 04 3月, 2014 1 次提交
  28. 01 3月, 2014 1 次提交
  29. 12 2月, 2014 1 次提交
  30. 29 1月, 2014 2 次提交
  31. 26 1月, 2014 1 次提交
  32. 08 11月, 2013 2 次提交
    • P
      cpu: x86: Add internal CPUID features support and KVM feature bits · 2e8f9080
      Peter Krempa 提交于
      Some of the emulator features are presented in the <features> element in
      the domain XML although they are virtual CPUID feature bits when
      presented to the guest. To avoid confusing the users with these
      features, as they are not configurable via the <cpu> element, this patch
      adds an internal array where those can be stored privately instead of
      exposing them in the XML.
      
      Additionaly KVM feature bits are added as example usage of this code.
      2e8f9080
    • P
      cpu_x86: Refactor storage of CPUID data to add support for KVM features · f80a11c9
      Peter Krempa 提交于
      The CPUID functions were stored in multiple arrays according to a
      specified prefix of those. This made it very hard to add another prefix
      to store KVM CPUID features (0x40000000). Instead of hardcoding a third
      array this patch changes the approach used:
      
      The code is refactored to use a single array where the CPUID functions
      are stored ordered by the cpuid function so that they don't depend on
      the specific prefix and don't waste memory. The code is also less
      complex using this approach. A trateoff to this is the change from O(N)
      complexity to O(N^2) in x86DataAdd and x86DataSubtract. The rest of the
      functions were already using O(N^2) algorithms.
      f80a11c9
  33. 04 11月, 2013 2 次提交
    • P
      cpu: x86: Parse the CPU feature map only once · 629aff37
      Peter Krempa 提交于
      Until now the map was loaded from the XML definition file every time a
      operation on the flags was requested. With the introduciton of one shot
      initializers we can store the definition forever (as it will never
      change) instead of parsing it over and over again.
      629aff37
    • J
      cpu: Export few x86-specific APIs · 6f6e1f90
      Jiri Denemark 提交于
      This makes virCPUx86DataAddCPUID, virCPUx86DataFree, and
      virCPUx86MakeData available for direct usage outside of cpu driver in
      tests and the new qemu monitor that will request the actual CPU
      definition from a running qemu instance.
      6f6e1f90