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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA282C433F5 for ; Sun, 28 Nov 2021 17:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+pYUxZOFLhi87807ZepNq2TVlu7Vuw4K0dJeIS8b1AQ=; b=oFGteGCpG7hXgf qh0fCmJMFuIkfGNlos6/2wHV+OFqJb08GP2JP8Uulh0GvD22jHwAnmvjgMf9r5SqgXCsGrwmv9m/R 7BzvVyFj7ERar0eo8vR2exmcSC6tWqZBYQgZM8f900/bn+LlL04k8xgVbZeOqr8LUVLQwXt2SUzHj mb8L4/vsUbXu37TOsbqDa0JZwKc1nZKyPXk7bVbK5qlDfr+r8z3OBTdJSfh978SyF6PpUPleO769w AtHR3jXnSBEhtAaQ21trU+1Ur6diVwLaxQKowg0OJFSJttooUOVZi32PuaZ67cmdDleO9qILYiMMA MdzhNLaU7x04JQlFhZQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrNvo-00GKdp-FV; Sun, 28 Nov 2021 17:25:40 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrNvk-00GKdB-4M for linux-arm-kernel@lists.infradead.org; Sun, 28 Nov 2021 17:25:38 +0000 X-IronPort-AV: E=McAfee;i="6200,9189,10181"; a="234576041" X-IronPort-AV: E=Sophos;i="5.87,271,1631602800"; d="scan'208";a="234576041" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2021 09:25:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,271,1631602800"; d="scan'208";a="676066829" Received: from lkp-server02.sh.intel.com (HELO 9e1e9f9b3bcb) ([10.239.97.151]) by orsmga005.jf.intel.com with ESMTP; 28 Nov 2021 09:25:33 -0800 Received: from kbuild by 9e1e9f9b3bcb with local (Exim 4.92) (envelope-from ) id 1mrNvg-000AvW-RO; Sun, 28 Nov 2021 17:25:32 +0000 Date: Mon, 29 Nov 2021 01:25:19 +0800 From: kernel test robot To: Marc Zyngier Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall Subject: [arm-platforms:kvm-arm64/nv-5.16 38/71] arch/arm64/kvm/mmu.c:178: warning: expecting prototype for kvm_unmap_stage2_range(). Prototype was for __unmap_stage2_range() instead Message-ID: <202111290109.52igH1P0-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211128_092536_230137_AE6B2425 X-CRM114-Status: GOOD ( 14.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/nv-5.16 head: 6162310e2419353608acd8f247bde3fc848d4f64 commit: cd6a3361a2f89c063eb12cead9808136d54cd18f [38/71] KVM: arm64: nv: Support multiple nested Stage-2 mmu structures config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211129/202111290109.52igH1P0-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=cd6a3361a2f89c063eb12cead9808136d54cd18f git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git git fetch --no-tags arm-platforms kvm-arm64/nv-5.16 git checkout cd6a3361a2f89c063eb12cead9808136d54cd18f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 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 All warnings (new ones prefixed by >>): >> arch/arm64/kvm/mmu.c:178: warning: expecting prototype for kvm_unmap_stage2_range(). Prototype was for __unmap_stage2_range() instead vim +178 arch/arm64/kvm/mmu.c 378e6a9c78a02b arch/arm64/kvm/mmu.c Yanan Wang 2021-06-17 139 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 140 /* 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 141 * Unmapping vs dcache management: 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 142 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 143 * If a guest maps certain memory pages as uncached, all writes will 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 144 * bypass the data cache and go directly to RAM. However, the CPUs 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 145 * can still speculate reads (not writes) and fill cache lines with 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 146 * data. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 147 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 148 * Those cache lines will be *clean* cache lines though, so a 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 149 * clean+invalidate operation is equivalent to an invalidate 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 150 * operation, because no cache lines are marked dirty. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 151 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 152 * Those clean cache lines could be filled prior to an uncached write 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 153 * by the guest, and the cache coherent IO subsystem would therefore 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 154 * end up writing old data to disk. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 155 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 156 * This is why right after unmapping a page/section and invalidating 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 157 * the corresponding TLBs, we flush to make sure the IO subsystem will 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 158 * never hit in the cache. e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 159 * e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 160 * This is all avoided on systems that have ARM64_HAS_STAGE2_FWB, as e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 161 * we then fully enforce cacheability of RAM, no matter what the guest e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 162 * does. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 163 */ 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 164 /** cd6a3361a2f89c arch/arm64/kvm/mmu.c Marc Zyngier 2021-04-26 165 * kvm_unmap_stage2_range -- Clear stage2 page table entries to unmap a range c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 166 * @mmu: The KVM stage-2 MMU pointer 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 167 * @start: The intermediate physical base address of the range to unmap 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 168 * @size: The size of the area to unmap c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 169 * @may_block: Whether or not we are permitted to block 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 170 * 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 171 * Clear a range of stage-2 mappings, lowering the various ref-counts. Must 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 172 * be called while holding mmu_lock (unless for freeing the stage2 pgd before 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 173 * destroying the VM), otherwise another faulting VCPU may come in and mess 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 174 * with things behind our backs. 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 175 */ b5331379bc6261 arch/arm64/kvm/mmu.c Will Deacon 2020-08-11 176 static void __unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 size, b5331379bc6261 arch/arm64/kvm/mmu.c Will Deacon 2020-08-11 177 bool may_block) 4f853a714bf163 arch/arm/kvm/mmu.c Christoffer Dall 2014-05-09 @178 { cfb1a98de7a9aa arch/arm64/kvm/mmu.c Quentin Perret 2021-03-19 179 struct kvm *kvm = kvm_s2_mmu_to_kvm(mmu); 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 180 phys_addr_t end = start + size; 4f853a714bf163 arch/arm/kvm/mmu.c Christoffer Dall 2014-05-09 181 8b3405e345b5a0 arch/arm/kvm/mmu.c Suzuki K Poulose 2017-04-03 182 assert_spin_locked(&kvm->mmu_lock); 47a91b7232fa25 virt/kvm/arm/mmu.c Jia He 2018-05-21 183 WARN_ON(size & ~PAGE_MASK); 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 184 WARN_ON(stage2_apply_range(kvm, start, end, kvm_pgtable_stage2_unmap, 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 185 may_block)); 342cd0ab0e6ca3 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 186 } 000d399625b4b3 arch/arm/kvm/mmu.c Marc Zyngier 2013-03-05 187 :::::: The code at line 178 was first introduced by commit :::::: 4f853a714bf16338ff5261128e6c7ae2569e9505 arm/arm64: KVM: Fix and refactor unmap_range :::::: TO: Christoffer Dall :::::: CC: Christoffer Dall --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3536646995070048131==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [arm-platforms:kvm-arm64/nv-5.16 38/71] arch/arm64/kvm/mmu.c:178: warning: expecting prototype for kvm_unmap_stage2_range(). Prototype was for __unmap_stage2_range() instead Date: Mon, 29 Nov 2021 01:25:19 +0800 Message-ID: <202111290109.52igH1P0-lkp@intel.com> List-Id: --===============3536646995070048131== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.g= it kvm-arm64/nv-5.16 head: 6162310e2419353608acd8f247bde3fc848d4f64 commit: cd6a3361a2f89c063eb12cead9808136d54cd18f [38/71] KVM: arm64: nv: Su= pport multiple nested Stage-2 mmu structures config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/2021112= 9/202111290109.52igH1P0-lkp(a)intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms= .git/commit/?id=3Dcd6a3361a2f89c063eb12cead9808136d54cd18f git remote add arm-platforms https://git.kernel.org/pub/scm/linux/k= ernel/git/maz/arm-platforms.git git fetch --no-tags arm-platforms kvm-arm64/nv-5.16 git checkout cd6a3361a2f89c063eb12cead9808136d54cd18f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darm64 SHELL=3D/bin/bash arch/arm64/kvm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> arch/arm64/kvm/mmu.c:178: warning: expecting prototype for kvm_unmap_sta= ge2_range(). Prototype was for __unmap_stage2_range() instead vim +178 arch/arm64/kvm/mmu.c 378e6a9c78a02b arch/arm64/kvm/mmu.c Yanan Wang 2021-06-17 139 = 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 140 /* 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 141 * Un= mapping vs dcache management: 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 142 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 143 * If= a guest maps certain memory pages as uncached, all writes will 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 144 * by= pass the data cache and go directly to RAM. However, the CPUs 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 145 * ca= n still speculate reads (not writes) and fill cache lines with 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 146 * da= ta. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 147 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 148 * Th= ose cache lines will be *clean* cache lines though, so a 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 149 * cl= ean+invalidate operation is equivalent to an invalidate 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 150 * op= eration, because no cache lines are marked dirty. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 151 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 152 * Th= ose clean cache lines could be filled prior to an uncached write 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 153 * by= the guest, and the cache coherent IO subsystem would therefore 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 154 * en= d up writing old data to disk. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 155 * 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 156 * Th= is is why right after unmapping a page/section and invalidating 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 157 * th= e corresponding TLBs, we flush to make sure the IO subsystem will 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 158 * ne= ver hit in the cache. e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 159 * e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 160 * Th= is is all avoided on systems that have ARM64_HAS_STAGE2_FWB, as e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 161 * we= then fully enforce cacheability of RAM, no matter what the guest e48d53a91f6e90 virt/kvm/arm/mmu.c Marc Zyngier 2018-04-06 162 * do= es. 363ef89f8e9bce arch/arm/kvm/mmu.c Marc Zyngier 2014-12-19 163 */ 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 164 /** cd6a3361a2f89c arch/arm64/kvm/mmu.c Marc Zyngier 2021-04-26 165 * kv= m_unmap_stage2_range -- Clear stage2 page table entries to unmap a range c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 166 * @m= mu: The KVM stage-2 MMU pointer 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 167 * @s= tart: The intermediate physical base address of the range to unmap 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 168 * @s= ize: The size of the area to unmap c9c0279cc02b4e arch/arm64/kvm/mmu.c Xiaofei Tan 2020-09-17 169 * @m= ay_block: Whether or not we are permitted to block 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 170 * 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 171 * Cl= ear a range of stage-2 mappings, lowering the various ref-counts. Must 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 172 * be= called while holding mmu_lock (unless for freeing the stage2 pgd before 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 173 * de= stroying the VM), otherwise another faulting VCPU may come in and mess 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 174 * wi= th things behind our backs. 7a1c831ee8553b arch/arm/kvm/mmu.c Suzuki K Poulose 2016-03-23 175 */ b5331379bc6261 arch/arm64/kvm/mmu.c Will Deacon 2020-08-11 176 stati= c void __unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 = size, b5331379bc6261 arch/arm64/kvm/mmu.c Will Deacon 2020-08-11 177 = bool may_block) 4f853a714bf163 arch/arm/kvm/mmu.c Christoffer Dall 2014-05-09 @178 { cfb1a98de7a9aa arch/arm64/kvm/mmu.c Quentin Perret 2021-03-19 179 stru= ct kvm *kvm =3D kvm_s2_mmu_to_kvm(mmu); 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 180 phys= _addr_t end =3D start + size; 4f853a714bf163 arch/arm/kvm/mmu.c Christoffer Dall 2014-05-09 181 = 8b3405e345b5a0 arch/arm/kvm/mmu.c Suzuki K Poulose 2017-04-03 182 asse= rt_spin_locked(&kvm->mmu_lock); 47a91b7232fa25 virt/kvm/arm/mmu.c Jia He 2018-05-21 183 WARN= _ON(size & ~PAGE_MASK); 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 184 WARN= _ON(stage2_apply_range(kvm, start, end, kvm_pgtable_stage2_unmap, 52bae936f0e7be arch/arm64/kvm/mmu.c Will Deacon 2020-09-11 185 = may_block)); 342cd0ab0e6ca3 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 186 } 000d399625b4b3 arch/arm/kvm/mmu.c Marc Zyngier 2013-03-05 187 = :::::: The code at line 178 was first introduced by commit :::::: 4f853a714bf16338ff5261128e6c7ae2569e9505 arm/arm64: KVM: Fix and ref= actor unmap_range :::::: TO: Christoffer Dall :::::: CC: Christoffer Dall --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3536646995070048131==--