Hi Ben, url: https://github.com/0day-ci/linux/commits/Ben-Gardon/Introduce-the-TDP-MMU/20200926-052649 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6d28cf7dfede6cfca5119a0d415a6a447c68f3a0 config: x86_64-randconfig-m001-20201008 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: arch/x86/kvm/mmu/mmu.c:3995 get_mmio_spte() error: uninitialized symbol 'root'. vim +/root +3995 arch/x86/kvm/mmu/mmu.c ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3974 static bool get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr, u64 *sptep) ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3975 { ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3976 u64 sptes[PT64_ROOT_MAX_LEVEL]; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3977 struct rsvd_bits_validate *rsvd_check; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3978 int root; "root" is never initialized anywhere. Part of the commit missing? ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3979 int leaf; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3980 int level; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3981 bool reserved = false; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3982 ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3983 if (!VALID_PAGE(vcpu->arch.mmu->root_hpa)) { ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3984 *sptep = 0ull; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3985 return reserved; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3986 } ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3987 ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3988 if (is_tdp_mmu_root(vcpu->kvm, vcpu->arch.mmu->root_hpa)) ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3989 leaf = kvm_tdp_mmu_get_walk(vcpu, addr, sptes); ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3990 else ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3991 leaf = get_walk(vcpu, addr, sptes); ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3992 ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3993 rsvd_check = &vcpu->arch.mmu->shadow_zero_check; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3994 ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 @3995 for (level = root; level >= leaf; level--) { ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3996 if (!is_shadow_present_pte(sptes[level - 1])) ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 3997 break; b5c3c1b3c6e95cc arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3998 /* b5c3c1b3c6e95cc arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3999 * Use a bitwise-OR instead of a logical-OR to aggregate the b5c3c1b3c6e95cc arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 4000 * reserved bit and EPT's invalid memtype/XWR checks to avoid b5c3c1b3c6e95cc arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 4001 * adding a Jcc in the loop. b5c3c1b3c6e95cc arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 4002 */ ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4003 reserved |= __is_bad_mt_xwr(rsvd_check, sptes[level - 1]) | ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4004 __is_rsvd_bits_set(rsvd_check, sptes[level - 1], ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4005 level); 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4006 } 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4007 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4008 if (reserved) { 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4009 pr_err("%s: detect reserved bits on spte, addr 0x%llx, dump hierarchy:\n", 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4010 __func__, addr); ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4011 for (level = root; level >= leaf; level--) 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4012 pr_err("------ spte 0x%llx level %d.\n", ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4013 sptes[level - 1], level); 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4014 } ddce6208217c1aa arch/x86/kvm/mmu/mmu.c Sean Christopherson 2019-12-06 4015 ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4016 *sptep = sptes[leaf - 1]; ea7e7c74afc3303 arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-09-25 4017 47ab8751695f71d arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 4018 return reserved; ce88decffd17bf9 arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 4019 } --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org