arch/x86/kvm/svm/sev.c:1924:26: error: 'nr_asids' undeclared

From: kernel test robot
Date: Tue Aug 03 2021 - 18:00:24 EST


tree: https://github.com/0day-ci/linux/commits/UPDATE-20210804-005109/Mingwei-Zhang/KVM-SVM-improve-the-code-readability-for-ASID-management/20210803-021238
head: 793fe38a7dcd03cbb973b30601ec3d9b369bfd60
commit: 793fe38a7dcd03cbb973b30601ec3d9b369bfd60 KVM: SVM: improve the code readability for ASID management
date: 5 hours ago
config: i386-randconfig-r002-20210803 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/793fe38a7dcd03cbb973b30601ec3d9b369bfd60
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20210804-005109/Mingwei-Zhang/KVM-SVM-improve-the-code-readability-for-ASID-management/20210803-021238
git checkout 793fe38a7dcd03cbb973b30601ec3d9b369bfd60
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/

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

All errors (new ones prefixed by >>):

arch/x86/kvm/svm/sev.c: In function 'sev_cpu_init':
>> arch/x86/kvm/svm/sev.c:1924:26: error: 'nr_asids' undeclared (first use in this function)
1924 | sd->sev_vmcbs = kcalloc(nr_asids, sizeof(void *), GFP_KERNEL);
| ^~~~~~~~
arch/x86/kvm/svm/sev.c:1924:26: note: each undeclared identifier is reported only once for each function it appears in


vim +/nr_asids +1924 arch/x86/kvm/svm/sev.c

1918
1919 int sev_cpu_init(struct svm_cpu_data *sd)
1920 {
1921 if (!sev_enabled)
1922 return 0;
1923
> 1924 sd->sev_vmcbs = kcalloc(nr_asids, sizeof(void *), GFP_KERNEL);
1925 if (!sd->sev_vmcbs)
1926 return -ENOMEM;
1927
1928 return 0;
1929 }
1930

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

Attachment: .config.gz
Description: application/gzip