Re: [PATCH v9 07/14] KVM: Don't allocate dirty bitmap if dirty ring is enabled

From: kbuild test robot
Date: Tue May 26 2020 - 15:25:05 EST

Hi Peter,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on vhost/linux-next]
[also build test WARNING on linus/master v5.7-rc7]
[cannot apply to kvm/linux-next tip/auto-latest linux/master next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see]

base: linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 ( 3393cc4cebf9969db94dc424b7a2b6195589c33b)
reproduce (this is a W=1 build):
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> arch/x86/kvm/mmu/mmu.c:1280:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct kvm_memory_slot *' [-Wnon-literal-null-conversion]
return false;
1 warning generated.

vim +1280 arch/x86/kvm/mmu/mmu.c

1270 static struct kvm_memory_slot *
1271 gfn_to_memslot_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t gfn,
1272 bool no_dirty_log)
1273 {
1274 struct kvm_memory_slot *slot;
1276 slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);
1277 if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
1278 return NULL;
1279 if (no_dirty_log && kvm_slot_dirty_track_enabled(slot))
> 1280 return false;
1282 return slot;
1283 }

0-DAY CI Kernel Test Service, Intel Corporation

Attachment: .config.gz
Description: application/gzip