1. 29 1月, 2020 1 次提交
  2. 17 1月, 2020 3 次提交
  3. 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
  4. 07 1月, 2020 1 次提交
  5. 10 12月, 2019 1 次提交
  6. 15 11月, 2019 1 次提交
  7. 13 11月, 2019 1 次提交
  8. 12 11月, 2019 1 次提交
  9. 15 10月, 2019 2 次提交
  10. 07 10月, 2019 1 次提交
  11. 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
  12. 15 4月, 2019 2 次提交
  13. 13 4月, 2019 1 次提交
  14. 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
  15. 20 9月, 2018 2 次提交
  16. 14 8月, 2018 3 次提交
  17. 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
  18. 11 1月, 2018 1 次提交
  19. 08 1月, 2018 4 次提交
  20. 04 1月, 2018 1 次提交
  21. 30 5月, 2017 1 次提交
  22. 09 5月, 2017 2 次提交
  23. 27 4月, 2017 1 次提交
  24. 07 4月, 2017 1 次提交
  25. 27 3月, 2017 2 次提交
  26. 14 12月, 2016 1 次提交
    • V
      util: Allow to query the presence of host CPU bitmaps · 1be35910
      Viktor Mihajlovski 提交于
      The functions to retrieve online and present host CPU information
      are only supported on Linux for the time being.
      
      This leads to runtime errors if these function are used on other
      platforms. To avoid that, code in higher levels using the functions
      must replicate the conditional compilation in higher level which
      is error prone (and is plainly spoken ugly).
      
      Adding a function virHostCPUHasBitmap that can be used to check
      for host CPU bitmap support.
      
      NB: There are other functions including the host CPU count that
      are lacking support on all platforms, but they are too essential
      in order to be bypassed.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      1be35910