lkml.org 
[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[avpatel:riscv_kvm_aia_v1 30/36] arch/arm64/kvm/mmu.c:767:55: warning: incompatible pointer to integer conversion initializing 'gfp_t' (aka 'unsigned int') with an expression of type 'void *'
tree:   https://github.com/avpatel/linux.git riscv_kvm_aia_v1
head: 59b7f8e2f5ff4f5506a6d781179f42abd758faaa
commit: 2e1468f8a505d8b65cf6e3e77348690d9b167923 [30/36] RISC-V: KVM: Add G-stage ioremap() and iounmap() functions
config: arm64-buildonly-randconfig-r003-20220512 (https://download.01.org/0day-ci/archive/20220513/202205130807.jiF3WnPH-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 9519dacab7b8afd537811fc2abaceb4d14f4e16a)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/avpatel/linux/commit/2e1468f8a505d8b65cf6e3e77348690d9b167923
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_kvm_aia_v1
git checkout 2e1468f8a505d8b65cf6e3e77348690d9b167923
# 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=arm64 SHELL=/bin/bash arch/arm64/kvm/

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

All warnings (new ones prefixed by >>):

>> arch/arm64/kvm/mmu.c:767:55: warning: incompatible pointer to integer conversion initializing 'gfp_t' (aka 'unsigned int') with an expression of type 'void *' [-Wint-conversion]
struct kvm_mmu_memory_cache cache = { 0, __GFP_ZERO, NULL, };
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
1 warning generated.


vim +767 arch/arm64/kvm/mmu.c

d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 752
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 753 /**
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 754 * kvm_phys_addr_ioremap - map a device range to guest IPA
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 755 *
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 756 * @kvm: The KVM pointer
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 757 * @guest_ipa: The IPA at which to insert the mapping
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 758 * @pa: The physical address of the device
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 759 * @size: The size of the mapping
c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 760 * @writable: Whether or not to create a writable mapping
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 761 */
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 762 int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
c40f2f8ff833ed arch/arm/kvm/mmu.c Ard Biesheuvel 2014-09-17 763 phys_addr_t pa, unsigned long size, bool writable)
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 764 {
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 765 phys_addr_t addr;
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 766 int ret = 0;
c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 @767 struct kvm_mmu_memory_cache cache = { 0, __GFP_ZERO, NULL, };
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 768 struct kvm_pgtable *pgt = kvm->arch.mmu.pgt;
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 769 enum kvm_pgtable_prot prot = KVM_PGTABLE_PROT_DEVICE |
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 770 KVM_PGTABLE_PROT_R |
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 771 (writable ? KVM_PGTABLE_PROT_W : 0);
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 772
bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 773 if (is_protected_kvm_enabled())
bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 774 return -EPERM;
bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 775
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 776 size += offset_in_page(guest_ipa);
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 777 guest_ipa &= PAGE_MASK;
c40f2f8ff833ed arch/arm/kvm/mmu.c Ard Biesheuvel 2014-09-17 778
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 779 for (addr = guest_ipa; addr < guest_ipa + size; addr += PAGE_SIZE) {
c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 780 ret = kvm_mmu_topup_memory_cache(&cache,
61ffb3a50c4402 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 781 kvm_mmu_cache_min_pages(kvm));
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 782 if (ret)
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 783 break;
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 784
fcc5bf89635a05 arch/arm64/kvm/mmu.c Jing Zhang 2022-01-18 785 write_lock(&kvm->mmu_lock);
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 786 ret = kvm_pgtable_stage2_map(pgt, addr, PAGE_SIZE, pa, prot,
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 787 &cache);
fcc5bf89635a05 arch/arm64/kvm/mmu.c Jing Zhang 2022-01-18 788 write_unlock(&kvm->mmu_lock);
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 789 if (ret)
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 790 break;
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 791
02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 792 pa += PAGE_SIZE;
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 793 }
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 794
c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 795 kvm_mmu_free_memory_cache(&cache);
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 796 return ret;
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 797 }
d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 798

:::::: The code at line 767 was first introduced by commit
:::::: c1a33aebe91d49c958df1648b2a84db96c403075 KVM: arm64: Use common KVM implementation of MMU memory caches

:::::: TO: Sean Christopherson <sean.j.christopherson@intel.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-05-13 02:51    [W:0.066 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site