1. 25 5月, 2020 3 次提交
  2. 24 3月, 2020 1 次提交
  3. 20 3月, 2020 1 次提交
  4. 17 3月, 2020 1 次提交
    • D
      virhostcpu.c: fix 'die_id' parsing for Power hosts · 0137bf0d
      Daniel Henrique Barboza 提交于
      Commit 7b79ee2f makes assumptions about die_id parsing in
      the sysfs that aren't true for Power hosts. In both Power8
      and Power9, running 5.6 and 4.18 kernel respectively,
      'die_id' is set to -1:
      
      $ cat /sys/devices/system/cpu/cpu0/topology/die_id
      -1
      
      This breaks virHostCPUGetDie() parsing because it is trying to
      retrieve an unsigned integer, causing problems during VM start:
      
      virFileReadValueUint:4128 : internal error: Invalid unsigned integer
      value '-1' in file '/sys/devices/system/cpu/cpu0/topology/die_id'
      
      This isn't necessarily a PowerPC only behavior. Linux kernel commit
      0e344d8c70 added in the former Documentation/cputopology.txt, now
      Documentation/admin-guide/cputopology.rst, that:
      
        To be consistent on all architectures, include/linux/topology.h
        provides default definitions for any of the above macros that are
        not defined by include/asm-XXX/topology.h:
      
        1) topology_physical_package_id: -1
        2) topology_die_id: -1
        (...)
      
      This means that it might be expected that an architecture that
      does not implement the die_id element will mark it as -1 in
      sysfs.
      
      It is not required to change die_id implementation from uInt to
      Int because of that. Instead, let's change the parsing of the
      die_id in virHostCPUGetDie() to read an integer value and, in
      case it's -1, default it to zero like in case of file not found.
      This is enough to solve the issue Power hosts are experiencing.
      
      Fixes: 7b79ee2fSigned-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      0137bf0d
  5. 14 3月, 2020 1 次提交
  6. 29 1月, 2020 1 次提交
  7. 17 1月, 2020 3 次提交
  8. 16 1月, 2020 1 次提交
    • D
      hostcpu: add support for reporting die_id in NUMA topology · 7b79ee2f
      Daniel P. Berrangé 提交于
      Update the host CPU code to report the die_id in the NUMA topology
      capabilities. On systems with multiple dies, this fixes the bug
      where CPU cores can't be distinguished:
      
       <cpus num='12'>
         <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
         <cpu id='1' socket_id='0' core_id='1' siblings='1'/>
         <cpu id='2' socket_id='0' core_id='0' siblings='2'/>
         <cpu id='3' socket_id='0' core_id='1' siblings='3'/>
       </cpus>
      
      Notice how core_id is repeated within the scope of the same socket_id.
      
      It now reports
      
       <cpus num='12'>
         <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
         <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
         <cpu id='2' socket_id='0' die_id='1' core_id='0' siblings='2'/>
         <cpu id='3' socket_id='0' die_id='1' core_id='1' siblings='3'/>
       </cpus>
      
      So core_id is now unique within a (socket_id, die_id) pair.
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      7b79ee2f
  9. 07 1月, 2020 1 次提交
  10. 10 12月, 2019 1 次提交
  11. 15 11月, 2019 1 次提交
  12. 13 11月, 2019 1 次提交
  13. 12 11月, 2019 1 次提交
  14. 15 10月, 2019 2 次提交
  15. 07 10月, 2019 1 次提交
  16. 04 6月, 2019 1 次提交
    • J
      util: Add virHostCPUGetTscInfo · f0f6faba
      Jiri Denemark 提交于
      On a KVM x86_64 host which supports invariant TSC this function can be
      used to detect the TSC frequency and the availability of TSC scaling.
      
      The magic MSR numbers required to check if VMX scaling is supported on
      the host are documented in Volume 3 of the Intel® 64 and IA-32
      Architectures Software Developer’s Manual.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      f0f6faba
  17. 15 4月, 2019 2 次提交
  18. 13 4月, 2019 1 次提交
  19. 14 12月, 2018 3 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  20. 20 9月, 2018 2 次提交
  21. 14 8月, 2018 3 次提交
  22. 23 7月, 2018 1 次提交
    • A
      src: Make virStr*cpy*() functions return an int · 6c0d0210
      Andrea Bolognani 提交于
      Currently, the functions return a pointer to the
      destination buffer on success or NULL on failure.
      
      Not only does this kind of error handling look quite
      alien in the context of libvirt, where most functions
      return zero on success and a negative int on failure,
      but it's also somewhat pointless because unless there's
      been a failure the returned pointer will be the same
      one passed in by the user, thus offering no additional
      value.
      
      Change the functions so that they return an int
      instead.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      6c0d0210
  23. 11 1月, 2018 1 次提交
  24. 08 1月, 2018 4 次提交
  25. 04 1月, 2018 1 次提交
  26. 30 5月, 2017 1 次提交