1. 11 8月, 2015 1 次提交
    • A
      cpu: Mark driver functions in ppc64 driver · 2686bf22
      Andrea Bolognani 提交于
      Use the ppc64Driver prefix for all functions that are used to
      fill in the cpuDriverPPC64 structure, ie. those that are going
      to be called by the generic CPU code.
      
      This makes it clear which functions are exported and which are
      implementation details; it also gets rid of the ambiguity that
      affected the ppc64DataFree() function which, despite what the
      name suggested, was not related to ppc64DataCopy() and could
      not be used to release the memory allocated for a
      virCPUppc64Data* instance.
      
      No functional changes.
      2686bf22
  2. 05 8月, 2015 4 次提交
  3. 23 3月, 2015 1 次提交
  4. 02 3月, 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. 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
  9. 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
  10. 06 5月, 2014 1 次提交
  11. 25 3月, 2014 1 次提交
  12. 18 3月, 2014 1 次提交
  13. 15 10月, 2013 1 次提交
    • E
      maint: avoid 'const fooPtr' in cpu files · d694ae0c
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up offenders in src/cpu.
      
      * src/cpu/cpu.h (cpuArchDecode, cpuArchEncode, cpuArchUpdate)
      (cpuArchHasFeature, cpuDecode, cpuEncode, cpuUpdate)
      (cpuHasFeature): Use intended type.
      * src/conf/cpu_conf.h (virCPUDefCopyModel, virCPUDefCopy):
      Likewise.
      (virCPUDefParseXML): Drop const.
      * src/cpu/cpu.c (cpuDecode, cpuEncode, cpuUpdate, cpuHasFeature):
      Fix fallout.
      * src/cpu/cpu_x86.c (x86ModelFromCPU, x86ModelSubtractCPU)
      (x86DecodeCPUData, x86EncodePolicy, x86Encode, x86UpdateCustom)
      (x86UpdateHostModel, x86Update, x86HasFeature): Likewise.
      * src/cpu/cpu_s390.c (s390Decode): Likewise.
      * src/cpu/cpu_arm.c (ArmDecode): Likewise.
      * src/cpu/cpu_powerpc.c (ppcModelFromCPU, ppcCompute, ppcDecode)
      (ppcUpdate): Likewise.
      * src/conf/cpu_conf.c (virCPUDefCopyModel, virCPUDefCopy)
      (virCPUDefParseXML): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d694ae0c
  14. 10 9月, 2013 1 次提交
  15. 05 9月, 2013 2 次提交
    • L
      cpu: Implement guestData and update for PPC · b2a68c99
      Li Zhang 提交于
      On Power platform, Power7+ can support Power7 guest.
      It needs to define XML configuration to specify guest's CPU model.
      
      For exmaple:
        <cpu match='exact'>
          <model>POWER7_v2.1</model>
          <vendor>IBM</vendor>
        </cpu>
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      b2a68c99
    • 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
  16. 17 8月, 2013 1 次提交
  17. 29 7月, 2013 1 次提交
  18. 22 7月, 2013 2 次提交
  19. 11 7月, 2013 1 次提交
  20. 10 7月, 2013 1 次提交
  21. 09 5月, 2013 1 次提交
  22. 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
  23. 19 4月, 2013 7 次提交
    • J
      cpu: Rename PowerPCUpdate and PowerPCDataFree functions · f1a1ebf1
      Jiri Denemark 提交于
      For consistency with other functions in PowerPC CPU driver, the two
      functions are renamed as ppcUpdate and ppcDataFree, respectively.
      f1a1ebf1
    • J
      cpu: Remove hardcoded list of PowerPC models · 7a4f1238
      Jiri Denemark 提交于
      The cpu_map.xml file is there to separate CPU model definitions from the
      code. Having the only interesting data for PowerPC models only in the
      source code. This patch moves this data to the XML file and removes the
      hardcoded list completely.
      7a4f1238
    • J
      cpu: Reimplement PowerPCDecode · f42ecaf1
      Jiri Denemark 提交于
      PowerPC CPUs are either identical or incompatible and thus we just need
      to look up the right model for given PVR without pretending we have
      several candidates which we may choose from.
      
      The function is also renamed as ppcDecode to match other functions in
      PowerPC CPU driver.
      f42ecaf1
    • J
      cpu: Reimplement PowerPCBaseline · fdf6efde
      Jiri Denemark 提交于
      Baseline API is supposed to return guest CPU definition that can be used
      on any of the provided host CPUs. Since PowerPC CPUs are either
      identical or incompatible, the API just needs to check that all provided
      CPUs are identical. Previous implementation was completely bogus.
      
      The function is also renamed as ppcBaseline to match other functions in
      PowerPC CPU driver.
      fdf6efde
    • J
      cpu: Fix loading PowerPC vendor from cpu_map.xml · ba8ba247
      Jiri Denemark 提交于
      When ppcVendorLoad fails to parse the vendor element for whatever
      reason, it is supposed to ignore it and return 0 rather than -1. The
      patch also removes PowerPC vendor string from the XML as it is not
      actually used for anything.
      ba8ba247
    • J
      cpu: Fix PowerPCNodeData · 70349cb9
      Jiri Denemark 提交于
      Make getting node CPU data for PowerPC unsupported on other
      architectures. The function is also renamed as ppcNodeData to match
      other functions in PowerPC CPU driver.
      70349cb9
    • J
      cpu: Make comparing PowerPC CPUs easier to read · 6af5a062
      Jiri Denemark 提交于
      Revert the condition to make it easier to read. The function is also
      renamed as ppcCompare to match other functions in PowerPC CPU driver.
      6af5a062
  24. 08 1月, 2013 1 次提交
  25. 21 12月, 2012 3 次提交