tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git master head: 73917739334c6509833b0403b81d4a04a8784bdf commit: f0d648bdf0a5bbc91da6099d5282f77996558ea4 [9/11] KVM: x86: map/unmap private slots in __x86_set_memory_region config: i386-randconfig-s0-201541 (attached as .config) reproduce: git checkout f0d648bdf0a5bbc91da6099d5282f77996558ea4 # save the attached .config to linux build tree make ARCH=i386
All warnings (new ones prefixed by >>):
arch/x86/kvm/x86.c: In function '__x86_set_memory_region':
>> arch/x86/kvm/x86.c:7499:14: warning: cast to pointer from integer of
>> different size [-Wint-to-pointer-cast]
if (IS_ERR((void *)hva))
^
arch/x86/kvm/x86.c:7500:19: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
return PTR_ERR((void *)hva);
^
vim +7499 arch/x86/kvm/x86.c
7483
7484 /* Called with kvm->slots_lock held. */
7485 if (WARN_ON(id >= KVM_MEM_SLOTS_NUM))
7486 return -EINVAL;
7487
7488 slot = id_to_memslot(slots, id);
7489 if (size) {
7490 if (WARN_ON(slot->npages))
7491 return -EEXIST;
7492
7493 /*
7494 * MAP_SHARED to prevent internal slot pages from being
moved
7495 * by fork()/COW.
7496 */
7497 hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
7498 MAP_SHARED | MAP_ANONYMOUS, 0);
> 7499 if (IS_ERR((void *)hva))
7500 return PTR_ERR((void *)hva);
7501 } else {
7502 if (!slot->npages)
7503 return 0;
7504
7505 hva = 0;
7506 }
7507
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: Binary data
