* [sean-jc:x86/formalize_shadow_mmu 29/39] arch/x86/kvm/mmu/mmu.c:3178:15: warning: no previous prototype for function 'mmu_shrink_scan'
@ 2023-03-18 6:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-18 6:37 UTC (permalink / raw)
To: Ben Gardon; +Cc: llvm, oe-kbuild-all, Sean Christopherson
Hi Ben,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://github.com/sean-jc/linux x86/formalize_shadow_mmu
head: dd395c7174581183cd66020ac5a784bdf2e79cd1
commit: 65d06e1aa5898de35579978883d1d71dad826347 [29/39] KVM: x86/MMU: Cleanup shrinker interface with Shadow MMU
config: x86_64-randconfig-a011-20230313 (https://download.01.org/0day-ci/archive/20230318/202303181408.ZCMIjrIl-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/sean-jc/linux/commit/65d06e1aa5898de35579978883d1d71dad826347
git remote add sean-jc https://github.com/sean-jc/linux
git fetch --no-tags sean-jc x86/formalize_shadow_mmu
git checkout 65d06e1aa5898de35579978883d1d71dad826347
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303181408.ZCMIjrIl-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kvm/mmu/mmu.c:758:1: error: version control conflict marker in file
<<<<<<< HEAD
^
arch/x86/kvm/mmu/mmu.c:2129:23: error: use of undeclared identifier 'paging64_sync_spte'; did you mean 'paging64_sync_page'?
context->sync_spte = paging64_sync_spte;
^~~~~~~~~~~~~~~~~~
paging64_sync_page
arch/x86/kvm/mmu/shadow_mmu.h:132:5: note: 'paging64_sync_page' declared here
int paging64_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp);
^
arch/x86/kvm/mmu/mmu.c:2136:23: error: use of undeclared identifier 'paging32_sync_spte'; did you mean 'paging32_sync_page'?
context->sync_spte = paging32_sync_spte;
^~~~~~~~~~~~~~~~~~
paging32_sync_page
arch/x86/kvm/mmu/shadow_mmu.h:131:5: note: 'paging32_sync_page' declared here
int paging32_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp);
^
arch/x86/kvm/mmu/mmu.c:2355:24: error: use of undeclared identifier 'ept_sync_spte'; did you mean 'ept_sync_page'?
context->sync_spte = ept_sync_spte;
^~~~~~~~~~~~~
ept_sync_page
arch/x86/kvm/mmu/shadow_mmu.h:133:5: note: 'ept_sync_page' declared here
int ept_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp);
^
arch/x86/kvm/mmu/mmu.c:2576:34: error: variable has incomplete type 'struct kvm_shadow_walk_iterator'
struct kvm_shadow_walk_iterator iterator;
^
arch/x86/kvm/mmu/mmu.c:2576:9: note: forward declaration of 'struct kvm_shadow_walk_iterator'
struct kvm_shadow_walk_iterator iterator;
^
arch/x86/kvm/mmu/mmu.c:2584:2: error: implicit declaration of function 'for_each_shadow_entry_using_root' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for_each_shadow_entry_using_root(vcpu, root_hpa, addr, iterator) {
^
>> arch/x86/kvm/mmu/mmu.c:3178:15: warning: no previous prototype for function 'mmu_shrink_scan' [-Wmissing-prototypes]
unsigned long mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
^
arch/x86/kvm/mmu/mmu.c:3178:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
^
static
1 warning and 6 errors generated.
vim +/mmu_shrink_scan +3178 arch/x86/kvm/mmu/mmu.c
3177
> 3178 unsigned long mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
3179 {
3180 struct kvm *kvm;
3181 int nr_to_scan = sc->nr_to_scan;
3182 unsigned long freed = 0;
3183
3184 mutex_lock(&kvm_lock);
3185
3186 list_for_each_entry(kvm, &vm_list, vm_list) {
3187 /*
3188 * Never scan more than sc->nr_to_scan VM instances.
3189 * Will not hit this condition practically since we do not try
3190 * to shrink more than one VM and it is very unlikely to see
3191 * !n_used_mmu_pages so many times.
3192 */
3193 if (!nr_to_scan--)
3194 break;
3195
3196 /*
3197 * n_used_mmu_pages is accessed without holding kvm->mmu_lock
3198 * here. We may skip a VM instance errorneosly, but we do not
3199 * want to shrink a VM that only started to populate its MMU
3200 * anyway.
3201 */
3202 if (!kvm->arch.n_used_mmu_pages &&
3203 !kvm_shadow_mmu_has_zapped_obsolete_pages(kvm))
3204 continue;
3205
3206 freed = kvm_shadow_mmu_shrink_scan(kvm, sc->nr_to_scan);
3207
3208 /*
3209 * unfair on small ones
3210 * per-vm shrinkers cry out
3211 * sadness comes quickly
3212 */
3213 list_move_tail(&kvm->vm_list, &vm_list);
3214 break;
3215 }
3216
3217 mutex_unlock(&kvm_lock);
3218 return freed;
3219 }
3220
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-18 6:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 6:37 [sean-jc:x86/formalize_shadow_mmu 29/39] arch/x86/kvm/mmu/mmu.c:3178:15: warning: no previous prototype for function 'mmu_shrink_scan' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.