Hi Yang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.14-rc7] [cannot apply to kvm/queue tip/perf/core tip/x86/core next-20210824] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yang-Weijiang/Introduce-Architectural-LBR-for-vPMU/20210824-154445 base: e22ce8eb631bdc47a4a4ea7ecf4e4ba499db4f93 config: x86_64-rhel-8.3-kselftests (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-348-gf0e6938b-dirty # https://github.com/0day-ci/linux/commit/60c157c9baf77b9c81f76dde1baf731cc12bab2c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yang-Weijiang/Introduce-Architectural-LBR-for-vPMU/20210824-154445 git checkout 60c157c9baf77b9c81f76dde1baf731cc12bab2c # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) arch/x86/kvm/vmx/pmu_intel.c: note: in included file (through arch/x86/kvm/vmx/vmx_ops.h, arch/x86/kvm/vmx/vmx.h, arch/x86/kvm/vmx/nested.h): >> arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a058a becomes 58a) >> arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a058a becomes 58a) arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a008a becomes 8a) arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a008a becomes 8a) arch/x86/kvm/vmx/evmcs.h:81:30: sparse: sparse: cast truncates bits from constant value (a008a becomes 8a) vim +81 arch/x86/kvm/vmx/evmcs.h 75edce8a45486f arch/x86/kvm/vmx/evmcs.h Sean Christopherson 2018-12-03 77 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 78 static __always_inline int get_evmcs_offset(unsigned long field, 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 79 u16 *clean_field) 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 80 { 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 @81 unsigned int index = ROL16(field, 6); 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 82 const struct evmcs_field *evmcs_field; 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 83 75edce8a45486f arch/x86/kvm/vmx/evmcs.h Sean Christopherson 2018-12-03 84 if (unlikely(index >= nr_evmcs_1_fields)) { 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 85 WARN_ONCE(1, "KVM: accessing unsupported EVMCS field %lx\n", 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 86 field); 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 87 return -ENOENT; 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 88 } 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 89 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 90 evmcs_field = &vmcs_field_to_evmcs_1[index]; 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 91 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 92 if (clean_field) 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 93 *clean_field = evmcs_field->clean_field; 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 94 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 95 return evmcs_field->offset; 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 96 } 773e8a0425c923 arch/x86/kvm/vmx_evmcs.h Vitaly Kuznetsov 2018-03-20 97 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip