Hi Yang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.14-rc4] [also build test WARNING on next-20210805] [cannot apply to kvm/queue tip/perf/core tip/x86/core] [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/20210806-153154 base: c500bee1c5b2f1d59b1081ac879d73268ab0ff17 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/1d5b4967a3c4553c3648638f1189dcbff631328e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yang-Weijiang/Introduce-Architectural-LBR-for-vPMU/20210806-153154 git checkout 1d5b4967a3c4553c3648638f1189dcbff631328e # 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 arch/x86/kvm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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@lists.01.org