1. 28 8月, 2014 1 次提交
  2. 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
  3. 26 6月, 2014 1 次提交
    • J
      cpuCompare*: Add support for reporting failure on incompatible CPUs · b14954fc
      Jiri Denemark 提交于
      When CPU comparison APIs return VIR_CPU_COMPARE_INCOMPATIBLE, the caller
      has no clue why the CPU is considered incompatible with host CPU. And in
      some cases, it would be nice to be able to get such info in a client
      rather than having to look in logs.
      
      To achieve this, the APIs can be told to return VIR_ERR_CPU_INCOMPATIBLE
      error for incompatible CPUs and the reason will be described in the
      associated error message.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b14954fc
  4. 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
  5. 06 5月, 2014 1 次提交
  6. 25 3月, 2014 1 次提交
  7. 18 3月, 2014 1 次提交
  8. 29 1月, 2014 2 次提交
  9. 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
  10. 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
  11. 15 10月, 2013 12 次提交
  12. 05 9月, 2013 1 次提交
    • D
      Ensure 'arch' is always set in cpuArchNodeData · 66ec11ad
      Daniel P. Berrange 提交于
      The s390, ppc and arm CPU drivers never set the 'arch' field
      in their impl of cpuArchNodeData. This leads to error messages
      being reported from cpuDataFree later, due to trying to use
      VIR_ARCH_NONE.
      
       #0  virRaiseErrorFull (filename=filename@entry=0x76f94434 "cpu/cpu.c", funcname=funcname@entry=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58,
           domain=domain@entry=31, code=code@entry=1, level=level@entry=VIR_ERR_ERROR, str1=0x76f70e18 "internal error: %s",
           str2=str2@entry=0x7155f2ec "undefined hardware architecture", str3=str3@entry=0x0, int1=int1@entry=-1, int2=int2@entry=-1, fmt=0x76f70e18 "internal error: %s")
           at util/virerror.c:646
       #1  0x76e682ea in virReportErrorHelper (domcode=domcode@entry=31, errorcode=errorcode@entry=1, filename=0x76f94434 "cpu/cpu.c",
           funcname=0x76f942dc <__FUNCTION__.18096> "cpuGetSubDriver", linenr=linenr@entry=58, fmt=0x76f7e7e4 "%s") at util/virerror.c:1292
       #2  0x76ed82d4 in cpuGetSubDriver (arch=<optimized out>) at cpu/cpu.c:57
       #3  cpuGetSubDriver (arch=VIR_ARCH_NONE) at cpu/cpu.c:51
       #4  0x76ed8818 in cpuDataFree (data=data@entry=0x70c22d78) at cpu/cpu.c:216
       #5  0x716aaec0 in virQEMUCapsInitCPU (arch=VIR_ARCH_ARMV7L, caps=0x70c29a08) at qemu/qemu_capabilities.c:867
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      66ec11ad
  13. 17 8月, 2013 1 次提交
  14. 22 7月, 2013 4 次提交
  15. 16 7月, 2013 2 次提交
  16. 11 7月, 2013 1 次提交
  17. 10 7月, 2013 1 次提交
  18. 09 5月, 2013 1 次提交
  19. 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
  20. 19 4月, 2013 1 次提交
  21. 13 2月, 2013 1 次提交
    • E
      util: use new virendian.h macros · 731ad692
      Eric Blake 提交于
      This makes code easier to read, by avoiding lines longer than
      80 columns and removing the repetition from the callers.
      
      * src/util/virstoragefile.c (qedGetHeaderUL, qedGetHeaderULL):
      Delete in favor of more generic macros.
      (qcow2GetBackingStoreFormat, qcowXGetBackingStore)
      (qedGetBackingStore, virStorageFileMatchesVersion)
      (virStorageFileGetMetadataInternal): Use new macros.
      * src/cpu/cpu_x86.c (x86VendorLoad): Likewise.
      731ad692
  22. 21 12月, 2012 1 次提交