1. 15 11月, 2016 1 次提交
  2. 22 9月, 2016 3 次提交
  3. 09 6月, 2016 1 次提交
  4. 02 6月, 2016 1 次提交
    • M
      ppc64Compute: Avoid possible NULL dereference · 09258c3c
      Michal Privoznik 提交于
      cpu/cpu_ppc64.c: In function 'ppc64Compute':
      cpu/cpu_ppc64.c:620:27: error: potential null pointer dereference [-Werror=null-dereference]
           if (STRNEQ(guest_model->name, host_model->name)) {
                      ~~~~~~~~~~~^~~
      cpu/cpu_ppc64.c:620:9: note: in expansion of macro 'STRNEQ'
           if (STRNEQ(guest_model->name, host_model->name)) {
               ^~~~~~
      cc1: all warnings being treated as errors
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      09258c3c
  5. 20 5月, 2016 3 次提交
  6. 16 5月, 2016 1 次提交
  7. 22 8月, 2015 3 次提交
  8. 12 8月, 2015 1 次提交
  9. 11 8月, 2015 12 次提交
    • A
      cpu: Forbid model fallback in the ppc64 driver · 344d1675
      Andrea Bolognani 提交于
      Unlike what happens on x86, on ppc64 you can't mix and match CPU
      features to obtain the guest CPU you want regardless of the host
      CPU, so the concept of model fallback doesn't apply.
      
      Make sure CPU definitions emitted by the driver, eg. as output of
      the cpuBaseline() and cpuUpdate() calls, reflect this fact.
      344d1675
    • A
      cpu: Implement backwards compatibility in the ppc64 driver · dee2247a
      Andrea Bolognani 提交于
      All previously recognized CPU models (POWER7_v2.1, POWER7_v2.3,
      POWER7+_v2.1 and POWER8_v1.0) are internally converted to the
      corrisponding generation name so that existing guests don't stop
      working.
      dee2247a
    • A
      cpu: Parse and use PVR masks in the ppc64 driver · 5d0aa93c
      Andrea Bolognani 提交于
      Instead of relying on a hard-coded mask value, read it from the CPU
      map XML and use it when looking up models by PVR.
      5d0aa93c
    • A
      cpu: Support multiple PVRs in the ppc64 driver · 59fcc961
      Andrea Bolognani 提交于
      This will allow us to perform PVR matching more broadly, eg. consider
      both POWER8 and POWER8E CPUs to be the same even though they have
      different PVR values.
      59fcc961
    • A
      cpu: Align ppc64 CPU data with x86 · adb865df
      Andrea Bolognani 提交于
      Use a typedef instead of the plain struct and heap allocation. This
      will make it easier to extend the ppc64 specific CPU data later on.
      adb865df
    • A
      cpu: Use ppc64Compute() to implement ppc64DriverCompare() · d574094d
      Andrea Bolognani 提交于
      This ensures comparison of two CPU definitions will be consistent
      regardless of the fact that it is performed using cpuCompare() or
      cpuGuestData(). The x86 driver uses the same exact code.
      d574094d
    • A
      cpu: CPU model names have to match on ppc64 · 96b2c745
      Andrea Bolognani 提交于
      Limitations of the POWER architecture mean that you can't run
      eg. a POWER7 guest on a POWER8 host when using KVM. This applies
      to all guests, not just those using VIR_CPU_MATCH_STRICT in the
      CPU definition; in fact, exact and strict CPU matching are
      basically the same on ppc64.
      
      This means, of course, that hosts using different CPUs have to be
      considered incompatible as well.
      
      Change ppc64Compute(), called by cpuGuestData(), to reflect this
      fact and update test cases accordingly.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1250977
      96b2c745
    • A
      cpu: Never skip CPU model name check in ppc64 driver · 8382136d
      Andrea Bolognani 提交于
      ppc64Compute(), called by cpuNodeData(), is used not only to retrieve
      the driver-specific data associated to a guest CPU definition, but
      also to check whether said guest CPU is compatible with the host CPU.
      
      If the user is not interested in the CPU data, it's perfectly fine
      to pass a NULL pointer instead of a return location, and the
      compatibility data returned should not be affected by this. One of
      the checks, specifically the one on CPU model name, was however
      only performed if the return location was non-NULL.
      8382136d
    • A
      cpu: Reorder functions in the ppc64 driver · b85b51f2
      Andrea Bolognani 提交于
      Having the functions grouped together this way will avoid further
      shuffling around down the line.
      
      No functional changes.
      b85b51f2
    • A
      cpu: Simplify ppc64ModelFromCPU() · c238d16a
      Andrea Bolognani 提交于
      c238d16a
    • A
      cpu: Simplify NULL handling in ppc64 driver · 4590f067
      Andrea Bolognani 提交于
      Use briefer checks, eg. (!model) instead of (model == NULL), and
      avoid initializing to NULL a pointer that would be assigned in
      the first line of the function anyway.
      
      Also remove a pointless NULL assignment.
      
      No functional changes.
      4590f067
    • 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
  10. 05 8月, 2015 4 次提交
  11. 23 3月, 2015 1 次提交
  12. 02 3月, 2015 1 次提交
  13. 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
  14. 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
  15. 07 11月, 2014 3 次提交
  16. 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
  17. 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
  18. 06 5月, 2014 1 次提交