Re: [PATCH v4 2/4] KVM: stats: Add fd-based API to read binary stats data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jing,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 9f242010c3b46e63bc62f08fff42cef992d3801b]

url:    https://github.com/0day-ci/linux/commits/Jing-Zhang/KVM-statistics-data-fd-based-binary-interface/20210430-043830
base:   9f242010c3b46e63bc62f08fff42cef992d3801b
config: s390-randconfig-r024-20210429 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://github.com/0day-ci/linux/commit/434cb14317623e9908098fc1c3925f2a6dcaa556
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jing-Zhang/KVM-statistics-data-fd-based-binary-interface/20210430-043830
        git checkout 434cb14317623e9908098fc1c3925f2a6dcaa556
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from arch/s390/kvm/kvm-s390.c:23:
   In file included from include/linux/kvm_host.h:33:
   In file included from include/linux/kvm_para.h:5:
   In file included from include/uapi/linux/kvm_para.h:37:
   In file included from arch/s390/include/asm/kvm_para.h:25:
   In file included from arch/s390/include/asm/diag.h:12:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> arch/s390/kvm/kvm-s390.c:154:21: warning: initializer-string for char array is too long [-Wexcess-initializers]
           STATS_DESC_COUNTER("instruction_sigp_stop_store_status"),
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kvm_host.h:1241:24: note: expanded from macro 'STATS_DESC_COUNTER'
           STATS_DESC_CUMULATIVE(name, KVM_STATS_UNIT_NONE,                       \
                                 ^~~~
   include/linux/kvm_host.h:1235:13: note: expanded from macro 'STATS_DESC_CUMULATIVE'
           STATS_DESC(name, KVM_STATS_TYPE_CUMULATIVE, unit, scale, exponent)
                      ^~~~
   include/linux/kvm_host.h:1232:39: note: expanded from macro 'STATS_DESC'
                   {type | unit | scale, exponent, 1}, name,                      \
                                                       ^~~~
   arch/s390/kvm/kvm-s390.c:156:21: warning: initializer-string for char array is too long [-Wexcess-initializers]
           STATS_DESC_COUNTER("instruction_sigp_store_adtl_status"),
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kvm_host.h:1241:24: note: expanded from macro 'STATS_DESC_COUNTER'
           STATS_DESC_CUMULATIVE(name, KVM_STATS_UNIT_NONE,                       \
                                 ^~~~
   include/linux/kvm_host.h:1235:13: note: expanded from macro 'STATS_DESC_CUMULATIVE'
           STATS_DESC(name, KVM_STATS_TYPE_CUMULATIVE, unit, scale, exponent)
                      ^~~~
   include/linux/kvm_host.h:1232:39: note: expanded from macro 'STATS_DESC'
                   {type | unit | scale, exponent, 1}, name,                      \
                                                       ^~~~
   14 warnings generated.


vim +154 arch/s390/kvm/kvm-s390.c

    77	
    78	struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
    79		STATS_VCPU_COMMON,
    80		STATS_DESC_COUNTER("exit_userspace"),
    81		STATS_DESC_COUNTER("exit_null"),
    82		STATS_DESC_COUNTER("exit_external_request"),
    83		STATS_DESC_COUNTER("exit_io_request"),
    84		STATS_DESC_COUNTER("exit_external_interrupt"),
    85		STATS_DESC_COUNTER("exit_stop_request"),
    86		STATS_DESC_COUNTER("exit_validity"),
    87		STATS_DESC_COUNTER("exit_instruction"),
    88		STATS_DESC_COUNTER("exit_pei"),
    89		STATS_DESC_COUNTER("halt_no_poll_steal"),
    90		STATS_DESC_COUNTER("instruction_lctl"),
    91		STATS_DESC_COUNTER("instruction_lctlg"),
    92		STATS_DESC_COUNTER("instruction_stctl"),
    93		STATS_DESC_COUNTER("instruction_stctg"),
    94		STATS_DESC_COUNTER("exit_program_interruption"),
    95		STATS_DESC_COUNTER("exit_instr_and_program"),
    96		STATS_DESC_COUNTER("exit_operation_exception"),
    97		STATS_DESC_COUNTER("deliver_ckc"),
    98		STATS_DESC_COUNTER("deliver_cputm"),
    99		STATS_DESC_COUNTER("deliver_external_call"),
   100		STATS_DESC_COUNTER("deliver_emergency_signal"),
   101		STATS_DESC_COUNTER("deliver_service_signal"),
   102		STATS_DESC_COUNTER("deliver_virtio"),
   103		STATS_DESC_COUNTER("deliver_stop_signal"),
   104		STATS_DESC_COUNTER("deliver_prefix_signal"),
   105		STATS_DESC_COUNTER("deliver_restart_signal"),
   106		STATS_DESC_COUNTER("deliver_program"),
   107		STATS_DESC_COUNTER("deliver_io"),
   108		STATS_DESC_COUNTER("deliver_machine_check"),
   109		STATS_DESC_COUNTER("exit_wait_state"),
   110		STATS_DESC_COUNTER("inject_ckc"),
   111		STATS_DESC_COUNTER("inject_cputm"),
   112		STATS_DESC_COUNTER("inject_external_call"),
   113		STATS_DESC_COUNTER("inject_emergency_signal"),
   114		STATS_DESC_COUNTER("inject_mchk"),
   115		STATS_DESC_COUNTER("inject_pfault_init"),
   116		STATS_DESC_COUNTER("inject_program"),
   117		STATS_DESC_COUNTER("inject_restart"),
   118		STATS_DESC_COUNTER("inject_set_prefix"),
   119		STATS_DESC_COUNTER("inject_stop_signal"),
   120		STATS_DESC_COUNTER("instruction_epsw"),
   121		STATS_DESC_COUNTER("instruction_gs"),
   122		STATS_DESC_COUNTER("instruction_io_other"),
   123		STATS_DESC_COUNTER("instruction_lpsw"),
   124		STATS_DESC_COUNTER("instruction_lpswe"),
   125		STATS_DESC_COUNTER("instruction_pfmf"),
   126		STATS_DESC_COUNTER("instruction_ptff"),
   127		STATS_DESC_COUNTER("instruction_sck"),
   128		STATS_DESC_COUNTER("instruction_sckpf"),
   129		STATS_DESC_COUNTER("instruction_stidp"),
   130		STATS_DESC_COUNTER("instruction_spx"),
   131		STATS_DESC_COUNTER("instruction_stpx"),
   132		STATS_DESC_COUNTER("instruction_stap"),
   133		STATS_DESC_COUNTER("instruction_iske"),
   134		STATS_DESC_COUNTER("instruction_ri"),
   135		STATS_DESC_COUNTER("instruction_rrbe"),
   136		STATS_DESC_COUNTER("instruction_sske"),
   137		STATS_DESC_COUNTER("instruction_ipte_interlock"),
   138		STATS_DESC_COUNTER("instruction_stsi"),
   139		STATS_DESC_COUNTER("instruction_stfl"),
   140		STATS_DESC_COUNTER("instruction_tb"),
   141		STATS_DESC_COUNTER("instruction_tpi"),
   142		STATS_DESC_COUNTER("instruction_tprot"),
   143		STATS_DESC_COUNTER("instruction_tsch"),
   144		STATS_DESC_COUNTER("instruction_sie"),
   145		STATS_DESC_COUNTER("instruction_essa"),
   146		STATS_DESC_COUNTER("instruction_sthyi"),
   147		STATS_DESC_COUNTER("instruction_sigp_sense"),
   148		STATS_DESC_COUNTER("instruction_sigp_sense_running"),
   149		STATS_DESC_COUNTER("instruction_sigp_external_call"),
   150		STATS_DESC_COUNTER("instruction_sigp_emergency"),
   151		STATS_DESC_COUNTER("instruction_sigp_cond_emergency"),
   152		STATS_DESC_COUNTER("instruction_sigp_start"),
   153		STATS_DESC_COUNTER("instruction_sigp_stop"),
 > 154		STATS_DESC_COUNTER("instruction_sigp_stop_store_status"),
   155		STATS_DESC_COUNTER("instruction_sigp_store_status"),
   156		STATS_DESC_COUNTER("instruction_sigp_store_adtl_status"),
   157		STATS_DESC_COUNTER("instruction_sigp_arch"),
   158		STATS_DESC_COUNTER("instruction_sigp_prefix"),
   159		STATS_DESC_COUNTER("instruction_sigp_restart"),
   160		STATS_DESC_COUNTER("instruction_sigp_init_cpu_reset"),
   161		STATS_DESC_COUNTER("instruction_sigp_cpu_reset"),
   162		STATS_DESC_COUNTER("instruction_sigp_unknown"),
   163		STATS_DESC_COUNTER("diagnose_10"),
   164		STATS_DESC_COUNTER("diagnose_44"),
   165		STATS_DESC_COUNTER("diagnose_9c"),
   166		STATS_DESC_COUNTER("diagnose_9c_ignored"),
   167		STATS_DESC_COUNTER("diagnose_258"),
   168		STATS_DESC_COUNTER("diagnose_308"),
   169		STATS_DESC_COUNTER("diagnose_500"),
   170		STATS_DESC_COUNTER("diagnose_other"),
   171		STATS_DESC_COUNTER("pfault_sync"),
   172	};
   173	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux