Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [sean-jc:x86/stats_pointer 1/1] arch/riscv/kvm/../../../virt/kvm/binary_stats.c:56: warning: Function parameter or struct member 'ext' not described in 'kvm_stats_read'
@ 2025-05-05  9:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-05  9:48 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/sean-jc/linux x86/stats_pointer
head:   b9a199c65702bb4d0d6bc77c88198df60cdd940f
commit: b9a199c65702bb4d0d6bc77c88198df60cdd940f [1/1] KVM: x86: PoC for shoving a subset of stats into a pointer
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20250505/202505051701.mjetMlOh-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250505/202505051701.mjetMlOh-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505051701.mjetMlOh-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/riscv/kvm/../../../virt/kvm/binary_stats.c:56: warning: Function parameter or struct member 'ext' not described in 'kvm_stats_read'
>> arch/riscv/kvm/../../../virt/kvm/binary_stats.c:56: warning: Function parameter or struct member 'size_ext' not described in 'kvm_stats_read'


vim +56 arch/riscv/kvm/../../../virt/kvm/binary_stats.c

cb082bfab59a22 Jing Zhang          2021-06-18  12  
cb082bfab59a22 Jing Zhang          2021-06-18  13  /**
cb082bfab59a22 Jing Zhang          2021-06-18  14   * kvm_stats_read() - Common function to read from the binary statistics
cb082bfab59a22 Jing Zhang          2021-06-18  15   * file descriptor.
cb082bfab59a22 Jing Zhang          2021-06-18  16   *
cb082bfab59a22 Jing Zhang          2021-06-18  17   * @id: identification string of the stats
cb082bfab59a22 Jing Zhang          2021-06-18  18   * @header: stats header for a vm or a vcpu
cb082bfab59a22 Jing Zhang          2021-06-18  19   * @desc: start address of an array of stats descriptors for a vm or a vcpu
cb082bfab59a22 Jing Zhang          2021-06-18  20   * @stats: start address of stats data block for a vm or a vcpu
cb082bfab59a22 Jing Zhang          2021-06-18  21   * @size_stats: the size of stats data block pointed by @stats
cb082bfab59a22 Jing Zhang          2021-06-18  22   * @user_buffer: start address of userspace buffer
cb082bfab59a22 Jing Zhang          2021-06-18  23   * @size: requested read size from userspace
cb082bfab59a22 Jing Zhang          2021-06-18  24   * @offset: the start position from which the content will be read for the
cb082bfab59a22 Jing Zhang          2021-06-18  25   *          corresponding vm or vcp file descriptor
cb082bfab59a22 Jing Zhang          2021-06-18  26   *
cb082bfab59a22 Jing Zhang          2021-06-18  27   * The file content of a vm/vcpu file descriptor is now defined as below:
cb082bfab59a22 Jing Zhang          2021-06-18  28   * +-------------+
cb082bfab59a22 Jing Zhang          2021-06-18  29   * |   Header    |
cb082bfab59a22 Jing Zhang          2021-06-18  30   * +-------------+
cb082bfab59a22 Jing Zhang          2021-06-18  31   * |  id string  |
cb082bfab59a22 Jing Zhang          2021-06-18  32   * +-------------+
cb082bfab59a22 Jing Zhang          2021-06-18  33   * | Descriptors |
cb082bfab59a22 Jing Zhang          2021-06-18  34   * +-------------+
cb082bfab59a22 Jing Zhang          2021-06-18  35   * | Stats Data  |
cb082bfab59a22 Jing Zhang          2021-06-18  36   * +-------------+
cb082bfab59a22 Jing Zhang          2021-06-18  37   * Although this function allows userspace to read any amount of data (as long
cb082bfab59a22 Jing Zhang          2021-06-18  38   * as in the limit) from any position, the typical usage would follow below
cb082bfab59a22 Jing Zhang          2021-06-18  39   * steps:
cb082bfab59a22 Jing Zhang          2021-06-18  40   * 1. Read header from offset 0. Get the offset of descriptors and stats data
cb082bfab59a22 Jing Zhang          2021-06-18  41   *    and some other necessary information. This is a one-time work for the
cb082bfab59a22 Jing Zhang          2021-06-18  42   *    lifecycle of the corresponding vm/vcpu stats fd.
cb082bfab59a22 Jing Zhang          2021-06-18  43   * 2. Read id string from its offset. This is a one-time work for the lifecycle
cb082bfab59a22 Jing Zhang          2021-06-18  44   *    of the corresponding vm/vcpu stats fd.
cb082bfab59a22 Jing Zhang          2021-06-18  45   * 3. Read descriptors from its offset and discover all the stats by parsing
cb082bfab59a22 Jing Zhang          2021-06-18  46   *    descriptors. This is a one-time work for the lifecycle of the
cb082bfab59a22 Jing Zhang          2021-06-18  47   *    corresponding vm/vcpu stats fd.
cb082bfab59a22 Jing Zhang          2021-06-18  48   * 4. Periodically read stats data from its offset using pread.
cb082bfab59a22 Jing Zhang          2021-06-18  49   *
cb082bfab59a22 Jing Zhang          2021-06-18  50   * Return: the number of bytes that has been successfully read
cb082bfab59a22 Jing Zhang          2021-06-18  51   */
cb082bfab59a22 Jing Zhang          2021-06-18  52  ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header,
cb082bfab59a22 Jing Zhang          2021-06-18  53  		       const struct _kvm_stats_desc *desc,
b9a199c65702bb Sean Christopherson 2025-04-30  54  		       void *stats, size_t size_stats, void *ext, size_t size_ext,
cb082bfab59a22 Jing Zhang          2021-06-18  55  		       char __user *user_buffer, size_t size, loff_t *offset)
cb082bfab59a22 Jing Zhang          2021-06-18 @56  {

:::::: The code at line 56 was first introduced by commit
:::::: cb082bfab59a224a49ae803fed52cd03e8d6b5e0 KVM: stats: Add fd-based API to read binary stats data

:::::: TO: Jing Zhang <jingzhangos@google.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-05  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05  9:48 [sean-jc:x86/stats_pointer 1/1] arch/riscv/kvm/../../../virt/kvm/binary_stats.c:56: warning: Function parameter or struct member 'ext' not described in 'kvm_stats_read' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox