From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E662C433EF for ; Wed, 6 Jul 2022 20:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234401AbiGFUOa (ORCPT ); Wed, 6 Jul 2022 16:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbiGFUOZ (ORCPT ); Wed, 6 Jul 2022 16:14:25 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14D81018 for ; Wed, 6 Jul 2022 13:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657138464; x=1688674464; h=date:from:to:cc:subject:message-id:mime-version; bh=Y+zu+bNJkg6ERwDMAeYKfWr5BOgucgOXpwz3moCHz0U=; b=Z6brlOlYNOJ/gwK/ClUoAj0GRS35hiAhGJDwQH1iR9Ea5rcP6r8e1FX1 Wmh0GtP0uQptqzV/RuuryjFFkMsHinHJ2FnvacXwbdnP1VE9CUut4V9Ld mjooE7qvVnVms1QbOpWFVwYM/qPlr7BR6JixhicA7db1QZjzjo5YoILiD Wz2nzbznDOx31tKjxgj+Rl2dP3ItReTQKN6PdQRn5++P7ot9TMDgIW8X7 wdeEQZBr7Wb1vpph84ls6aGQR1s25BseLJ2ygUWZWHMSgyecZwk5CPmzI AVLRk1mt05At+sHqKqfdpGPUYQSzITfqPTysOAqUg6odYaRj39Ua5uTmb w==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="283884457" X-IronPort-AV: E=Sophos;i="5.92,250,1650956400"; d="scan'208";a="283884457" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 13:14:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,250,1650956400"; d="scan'208";a="696251407" Received: from lkp-server01.sh.intel.com (HELO 68b931ab7ac1) ([10.239.97.150]) by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2022 13:14:23 -0700 Received: from kbuild by 68b931ab7ac1 with local (Exim 4.95) (envelope-from ) id 1o9BPi-000KzJ-MX; Wed, 06 Jul 2022 20:14:22 +0000 Date: Thu, 7 Jul 2022 04:13:43 +0800 From: kernel test robot To: Anup Patel Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: [avpatel:riscv_kvm_aia_v1 26/32] arch/arm64/kvm/mmu.c:789:55: warning: incompatible pointer to integer conversion initializing 'gfp_t' (aka 'unsigned int') with an expression of type 'void *' Message-ID: <202207070443.W7X0K87t-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/avpatel/linux.git riscv_kvm_aia_v1 head: 25efea788788c9750502faf4bee88cdd48418ba2 commit: 7e96535967c074ab03f14be95023f252274c5ee2 [26/32] RISC-V: KVM: Add G-stage ioremap() and iounmap() functions config: arm64-randconfig-r025-20220706 (https://download.01.org/0day-ci/archive/20220707/202207070443.W7X0K87t-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project f553287b588916de09c66e3e32bf75e5060f967f) 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/7e96535967c074ab03f14be95023f252274c5ee2 git remote add avpatel https://github.com/avpatel/linux.git git fetch --no-tags avpatel riscv_kvm_aia_v1 git checkout 7e96535967c074ab03f14be95023f252274c5ee2 # 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 where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> arch/arm64/kvm/mmu.c:789: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 +789 arch/arm64/kvm/mmu.c d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 774 d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 775 /** d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 776 * kvm_phys_addr_ioremap - map a device range to guest IPA d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 777 * d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 778 * @kvm: The KVM pointer d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 779 * @guest_ipa: The IPA at which to insert the mapping d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 780 * @pa: The physical address of the device d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 781 * @size: The size of the mapping c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 782 * @writable: Whether or not to create a writable mapping d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 783 */ d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 784 int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, c40f2f8ff833ed arch/arm/kvm/mmu.c Ard Biesheuvel 2014-09-17 785 phys_addr_t pa, unsigned long size, bool writable) d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 786 { 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 787 phys_addr_t addr; d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 788 int ret = 0; c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 @789 struct kvm_mmu_memory_cache cache = { 0, __GFP_ZERO, NULL, }; 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 790 struct kvm_pgtable *pgt = kvm->arch.mmu.pgt; 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 791 enum kvm_pgtable_prot prot = KVM_PGTABLE_PROT_DEVICE | 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 792 KVM_PGTABLE_PROT_R | 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 793 (writable ? KVM_PGTABLE_PROT_W : 0); d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 794 bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 795 if (is_protected_kvm_enabled()) bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 796 return -EPERM; bff01cb6b1bf68 arch/arm64/kvm/mmu.c Quentin Perret 2021-12-08 797 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 798 size += offset_in_page(guest_ipa); 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 799 guest_ipa &= PAGE_MASK; c40f2f8ff833ed arch/arm/kvm/mmu.c Ard Biesheuvel 2014-09-17 800 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 801 for (addr = guest_ipa; addr < guest_ipa + size; addr += PAGE_SIZE) { c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 802 ret = kvm_mmu_topup_memory_cache(&cache, 61ffb3a50c4402 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 803 kvm_mmu_cache_min_pages(kvm)); d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 804 if (ret) 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 805 break; 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 806 fcc5bf89635a05 arch/arm64/kvm/mmu.c Jing Zhang 2022-01-18 807 write_lock(&kvm->mmu_lock); 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 808 ret = kvm_pgtable_stage2_map(pgt, addr, PAGE_SIZE, pa, prot, 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 809 &cache); fcc5bf89635a05 arch/arm64/kvm/mmu.c Jing Zhang 2022-01-18 810 write_unlock(&kvm->mmu_lock); d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 811 if (ret) 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 812 break; d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 813 02bbd374ce4a8a arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 814 pa += PAGE_SIZE; d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 815 } d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 816 c1a33aebe91d49 arch/arm64/kvm/mmu.c Sean Christopherson 2020-07-02 817 kvm_mmu_free_memory_cache(&cache); d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 818 return ret; d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 819 } d5d8184d35c990 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 820 :::::: The code at line 789 was first introduced by commit :::::: c1a33aebe91d49c958df1648b2a84db96c403075 KVM: arm64: Use common KVM implementation of MMU memory caches :::::: TO: Sean Christopherson :::::: CC: Paolo Bonzini -- 0-DAY CI Kernel Test Service https://01.org/lkp