From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796284434; b=nNgbKdCBiBeqb3iCWIHYkV8HmmsuH7f4UyL+r360a+ktGPtvpwm8b9lhJd1la0m9j7h5 lT1vuQwVHdXEwfWt5tT11GhKrKXhfGGRCLCuzMTtjkcyP+/eOl5IiW+s1vsQS9hEGxQGw DcZ2gg0ubpfpmXnaAgN71zH4sDPiWTmPexEGKwUZSXHwkkZmQjr7/gsCkkK85i4L7vxS4 LaiFAfLEOCki64QOh7uDche8halBVL0qXshLDhFWswpQwPX9dskjvX1Uj0Ovtkfhkckve te1Lu58BEv/oMSSX1BbtJ6WU+9fYw2v4qPf0yPEUFS4QVSTb/XJhV/KokgDd7Pl1gkg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796284434; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:User-Agent:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=IAr7h1zi3MwHSeao/ClMwByROLDSnN7Q810FsfMXc+g=; b=gfso39eOkYQYYG60GYy2PhiktUf6juuQvKZquN4yaeLI+BqL0zQr402P7M7Il6p/CU2k hncFspWrUgZBs2p9/fuFJ6pdAqvADz6qiTvWYMl3TRCM1E7ZHmXBWe0OPD22Hwqctnrwo tVnJ/wev9EdvLRAxwRehnqn8xaTWp4nia4n70neXq4iXjK7r0mzuKo//3NdPM3In/QxJ7 MvB6y+AERpyhf7be1mGgewSgUAOYyr4H+pYxbv0X1b4XsAq9QvifPcB9n7KHrOfuxojaZ ZJpEgfE6Udl6hqCNxAZlnSSNC9QphsZXsPVpxj2jtH8LFvoa24FRzoDho4i1RqrfZpg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=E6R2+q+S; arc=none smtp.remote-ip=192.198.163.17 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88694606A322 for ; Thu, 3 Dec 2026 07:53:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 88694606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=E6R2+q+S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796284433; x=1827820433; h=date:from:to:cc:subject:message-id:mime-version: content-transfer-encoding; bh=IAr7h1zi3MwHSeao/ClMwByROLDSnN7Q810FsfMXc+g=; b=E6R2+q+SVO1dYubB3v78lGCQplHBBFpjZbFPRNd4/ynn4fiodQc923lE +hA8QgIS3EEUchVG4Aej5UcciKQ8rvCG2wO0AV28CwTySOhFbRa78GBkd 4VLguxzqla7U48+TjMOOGUzb+/NViCCAt4/eSSDM8b6Ey1ulB5OKVEAPt jbOMkZ2QYDWVfTdBvS89sMNJfIwA79mRQGzpOg2Z+/6f6/VCA6lAHE+v/ siaL1LcQiDCj8hoNGX9VpdrUf1e0ZUoCh+oLnX15JV+2Rvk19tRaOWRLh 9wlr7okdmoDzPYkLEZUXiZUUyf4azrG+yTGGeNdOTPD2vTWRUxSv/sepK Q==; X-CSE-ConnectionGUID: u+NZDhF7Qaqkd4IUC3aUvg== X-CSE-MsgGUID: h1CbCzW6QK211Mvf6BsFCA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5239305" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5239305" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 23:53:52 -0800 X-CSE-ConnectionGUID: A8/pZ78BRHijG/K1HxS7uQ== X-CSE-MsgGUID: o49Yn0+RRZe4U9IRhRvCrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="13989433" Received: from igk-lkp-server01.igk.intel.com (HELO 146cf1e082f1) ([10.211.93.152]) by fmviesa007.fm.intel.com with ESMTP; 02 Dec 2026 23:53:51 -0800 Received: from kbuild by 146cf1e082f1 with local (Exim 4.98.2) (envelope-from ) id 1xZ1dV-000000003cQ-1HTU; Thu, 03 Dec 2026 07:53:49 +0000 Date: Thu, 03 Dec 2026 08:53:47 +0100 From: kernel test robot To: cros-kernel-buildreports@googlegroups.com Cc: oe-kbuild-all@lists.linux.dev Subject: [android-common:android-mainline-desktop 1/1] mm/hmm.c:263:32: error: passing argument 1 of 'page_pgmap' makes pointer from integer without a cast Message-ID: <20261203084853.WMkEtorw-lkp@intel.com> User-Agent: s-nail v14.9.25 X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Vamsidhar, First bad commit (maybe !=3D root cause): tree: https://android.googlesource.com/kernel/common android-mainline-des= ktop head: 7140b283c3de8d3c2dda1e5a22a53b26e9bd0ca7 commit: ad36ecd6081db9827f1ebaa41671b0b336fd83bf [1/1] ANDROID: GKI: Enable= HMM_MIRROR config for all arch config: arm-randconfig-2002-20261203 (https://download.01.org/0day-ci/archi= ve/20261203/20261203084853.WMkEtorw-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 14.4.0 reproduce (this is a W=3D1 build): (https://download.01.org/0day-ci/archive= /20261203/20261203084853.WMkEtorw-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new versio= n of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/20261203084853.WMkEtorw-lkp= @intel.com/ All errors (new ones prefixed by >>): mm/hmm.c: In function 'pte_to_hmm_pfn_flags': mm/hmm.c:230:13: error: implicit declaration of function 'pte_none'; did= you mean 'p4d_none'? [-Wimplicit-function-declaration] 230 | if (pte_none(pte) || !pte_present(pte) || pte_protnone(p= te)) | ^~~~~~~~ | p4d_none mm/hmm.c:230:31: error: implicit declaration of function 'pte_present'; = did you mean 'p4d_present'? [-Wimplicit-function-declaration] 230 | if (pte_none(pte) || !pte_present(pte) || pte_protnone(p= te)) | ^~~~~~~~~~~ | p4d_present mm/hmm.c:230:51: error: implicit declaration of function 'pte_protnone' = [-Wimplicit-function-declaration] 230 | if (pte_none(pte) || !pte_present(pte) || pte_protnone(p= te)) | ^~~~~~~~~~~~ mm/hmm.c:232:16: error: implicit declaration of function 'pte_write'; di= d you mean 'pgd_write'? [-Wimplicit-function-declaration] 232 | return pte_write(pte) ? (HMM_PFN_VALID | HMM_PFN_WRITE) = : HMM_PFN_VALID; | ^~~~~~~~~ | pgd_write mm/hmm.c: In function 'hmm_vma_handle_pte': mm/hmm.c:243:21: error: implicit declaration of function 'ptep_get' [-Wi= mplicit-function-declaration] 243 | pte_t pte =3D ptep_get(ptep); | ^~~~~~~~ mm/hmm.c:247:13: error: implicit declaration of function 'pte_none_mostl= y' [-Wimplicit-function-declaration] 247 | if (pte_none_mostly(pte)) { | ^~~~~~~~~~~~~~~ mm/hmm.c:256:37: error: implicit declaration of function 'pte_to_swp_ent= ry' [-Wimplicit-function-declaration] 256 | swp_entry_t entry =3D pte_to_swp_entry(pte); | ^~~~~~~~~~~~~~~~ mm/hmm.c:256:37: error: invalid initializer mm/hmm.c:262:21: error: implicit declaration of function 'is_device_priv= ate_entry'; did you mean 'is_device_private_page'? [-Wimplicit-function-dec= laration] 262 | if (is_device_private_entry(entry) && | ^~~~~~~~~~~~~~~~~~~~~~~ | is_device_private_page mm/hmm.c:263:32: error: implicit declaration of function 'pfn_swap_entry= _to_page' [-Wimplicit-function-declaration] 263 | page_pgmap(pfn_swap_entry_to_page(entry))->o= wner =3D=3D | ^~~~~~~~~~~~~~~~~~~~~~ >> mm/hmm.c:263:32: error: passing argument 1 of 'page_pgmap' makes pointer= from integer without a cast [-Wint-conversion] 263 | page_pgmap(pfn_swap_entry_to_page(entry))->o= wner =3D=3D | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int In file included from include/linux/gfp.h:7, from include/linux/mm.h:7, from include/linux/pagewalk.h:5, from mm/hmm.c:11: include/linux/mmzone.h:1245:65: note: expected 'const struct page *' but= argument is of type 'int' 1245 | static inline struct dev_pagemap *page_pgmap(const struct page *= page) | ~~~~~~~~~~~~~~~~~~~= ^~~~ mm/hmm.c:266:29: error: implicit declaration of function 'is_writable_de= vice_private_entry' [-Wimplicit-function-declaration] 266 | if (is_writable_device_private_entry(ent= ry)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hmm.c:268:41: error: implicit declaration of function 'swp_offset_pfn= ' [-Wimplicit-function-declaration] 268 | new_pfn_flags =3D swp_offset_pfn(entry) = | cpu_flags; | ^~~~~~~~~~~~~~ mm/hmm.c:277:22: error: implicit declaration of function 'non_swap_entry= '; did you mean 'page_swap_entry'? [-Wimplicit-function-declaration] 277 | if (!non_swap_entry(entry)) | ^~~~~~~~~~~~~~ | page_swap_entry mm/hmm.c:283:21: error: implicit declaration of function 'is_device_excl= usive_entry' [-Wimplicit-function-declaration] 283 | if (is_device_exclusive_entry(entry)) | ^~~~~~~~~~~~~~~~~~~~~~~~~ mm/hmm.c:286:21: error: implicit declaration of function 'is_migration_e= ntry' [-Wimplicit-function-declaration] 286 | if (is_migration_entry(entry)) { | ^~~~~~~~~~~~~~~~~~ mm/hmm.c:287:25: error: implicit declaration of function 'pte_unmap'; di= d you mean 'memunmap'? [-Wimplicit-function-declaration] 287 | pte_unmap(ptep); | ^~~~~~~~~ | memunmap mm/hmm.c:289:25: error: implicit declaration of function 'migration_entr= y_wait' [-Wimplicit-function-declaration] 289 | migration_entry_wait(walk->mm, pmdp, add= r); | ^~~~~~~~~~~~~~~~~~~~ mm/hmm.c:309:26: error: implicit declaration of function 'pte_pfn'; did = you mean 'pud_pfn'? [-Wimplicit-function-declaration] 309 | !is_zero_pfn(pte_pfn(pte))) { | ^~~~~~~ | pud_pfn mm/hmm.c: In function 'hmm_vma_walk_pmd': mm/hmm.c:406:15: error: implicit declaration of function 'pmdp_get_lockl= ess'; did you mean 'pmd_offset_lockless'? [-Wimplicit-function-declaration] 406 | pmd =3D pmdp_get_lockless(pmdp); | ^~~~~~~~~~~~~~~~~ | pmd_offset_lockless mm/hmm.c:407:13: error: implicit declaration of function 'pmd_none'; did= you mean 'p4d_none'? [-Wimplicit-function-declaration] 407 | if (pmd_none(pmd)) | ^~~~~~~~ | p4d_none mm/hmm.c:410:42: error: implicit declaration of function 'is_pmd_migrati= on_entry' [-Wimplicit-function-declaration] 410 | if (thp_migration_supported() && is_pmd_migration_entry(= pmd)) { | ^~~~~~~~~~~~~~~~~~~~~~ mm/hmm.c:413:25: error: implicit declaration of function 'pmd_migration_= entry_wait' [-Wimplicit-function-declaration] 413 | pmd_migration_entry_wait(walk->mm, pmdp); | ^~~~~~~~~~~~~~~~~~~~~~~~ mm/hmm.c:419:14: error: implicit declaration of function 'pmd_present'; = did you mean 'p4d_present'? [-Wimplicit-function-declaration] 419 | if (!pmd_present(pmd)) | ^~~~~~~~~~~ | p4d_present mm/hmm.c:423:13: error: implicit declaration of function 'pmd_trans_huge= '; did you mean 'pmd_trans_huge_lock'? [-Wimplicit-function-declaration] 423 | if (pmd_trans_huge(pmd)) { | ^~~~~~~~~~~~~~ | pmd_trans_huge_lock mm/hmm.c:446:13: error: implicit declaration of function 'pmd_bad'; did = you mean 'p4d_bad'? [-Wimplicit-function-declaration] 446 | if (pmd_bad(pmd)) { | ^~~~~~~ | p4d_bad mm/hmm.c: In function 'hmm_range_fault': mm/hmm.c:667:21: error: implicit declaration of function 'mmu_interval_c= heck_retry' [-Wimplicit-function-declaration] 667 | if (mmu_interval_check_retry(range->notifier, | ^~~~~~~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for XFRM_OFFLOAD Depends on [n]: NET [=3Dn] Selected by [y]: - GKI_HIDDEN_XFRM_OFFLOAD_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for PAGE_POOL Depends on [n]: NET [=3Dn] Selected by [y]: - GKI_HIDDEN_NET_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for CAN_RX_OFFLOAD Depends on [n]: NETDEVICES [=3Dn] && CAN_DEV [=3Dn] && CAN_NETLINK [=3Dn] Selected by [y]: - GKI_HIDDEN_MCP251XFD_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for NET_DEVLINK Depends on [n]: NET [=3Dn] Selected by [y]: - GKI_HIDDEN_NET_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for WEXT_PROC Depends on [n]: NET [=3Dn] && WIRELESS [=3Dn] && PROC_FS [=3Dn] && WEXT_= CORE [=3Dy] Selected by [y]: - GKI_LEGACY_WEXT_ALLCONFIG [=3Dy] WARNING: unmet direct dependencies detected for DIMLIB Depends on [n]: NET [=3Dn] Selected by [y]: - GKI_HIDDEN_VIRTUAL_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for WEXT_PRIV Depends on [n]: NET [=3Dn] && WIRELESS [=3Dn] Selected by [y]: - GKI_LEGACY_WEXT_ALLCONFIG [=3Dy] WARNING: unmet direct dependencies detected for NET_PTP_CLASSIFY Depends on [n]: NET [=3Dn] Selected by [y]: - GKI_HIDDEN_NET_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for HMM_MIRROR Depends on [n]: MMU [=3Dn] Selected by [y]: - GKI_HIDDEN_DRM_CONFIGS [=3Dy] && DRM [=3Dy] WARNING: unmet direct dependencies detected for HVC_DRIVER Depends on [n]: TTY [=3Dn] Selected by [y]: - GKI_HIDDEN_VIRTUAL_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for USB_PHY Depends on [n]: USB_SUPPORT [=3Dn] Selected by [y]: - GKI_HIDDEN_USB_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for DRM_GEM_SHMEM_HELPER Depends on [n]: HAS_IOMEM [=3Dy] && DRM [=3Dy] && MMU [=3Dn] Selected by [y]: - GKI_HIDDEN_DRM_CONFIGS [=3Dy] && DRM [=3Dy] WARNING: unmet direct dependencies detected for BALLOON_COMPACTION Depends on [n]: COMPACTION [=3Dn] && MEMORY_BALLOON [=3Dy] Selected by [y]: - GKI_HIDDEN_MM_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for PHYLINK Depends on [n]: NETDEVICES [=3Dn] Selected by [y]: - GKI_HIDDEN_ETHERNET_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for DRM_TTM Depends on [n]: HAS_IOMEM [=3Dy] && DRM [=3Dy] && MMU [=3Dn] Selected by [y]: - GKI_HIDDEN_DRM_CONFIGS [=3Dy] && HAS_IOMEM [=3Dy] && DRM [=3Dy] WARNING: unmet direct dependencies detected for IOMMU_SVA Depends on [n]: IOMMU_SUPPORT [=3Dn] Selected by [y]: - GKI_HIDDEN_IOMMU_CONFIGS [=3Dy] WARNING: unmet direct dependencies detected for WIRELESS_EXT Depends on [n]: NET [=3Dn] && WIRELESS [=3Dn] Selected by [y]: - GKI_LEGACY_WEXT_ALLCONFIG [=3Dy] WARNING: unmet direct dependencies detected for WEXT_CORE Depends on [n]: NET [=3Dn] && WIRELESS [=3Dn] && (CFG80211_WEXT [=3Dn] |= | WIRELESS_EXT [=3Dy]) Selected by [y]: - GKI_LEGACY_WEXT_ALLCONFIG [=3Dy] vim +/page_pgmap +263 mm/hmm.c 2aee09d8c11642 J=C3=A9r=C3=B4me Glisse 2018-04-10 234 =20 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 235 static int hmm_vm= a_handle_pte(struct mm_walk *walk, unsigned long addr, 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 236 unsigned= long end, pmd_t *pmdp, pte_t *ptep, 2733ea144dcce7 Jason Gunthorpe 2020-05-01 237 unsigned long *hmm= _pfn) 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 238 { 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 239 struct hmm_vma_w= alk *hmm_vma_walk =3D walk->private; f88a1e90c66540 J=C3=A9r=C3=B4me Glisse 2018-04-10 240 struct hmm_range= *range =3D hmm_vma_walk->range; a3eb13c1579ba9 Jason Gunthorpe 2020-03-27 241 unsigned int required_faul= t; 2733ea144dcce7 Jason Gunthorpe 2020-05-01 242 unsigned long cpu_flags; c33c794828f212 Ryan Roberts 2023-06-12 243 pte_t pte =3D ptep_get(pte= p); 2733ea144dcce7 Jason Gunthorpe 2020-05-01 244 uint64_t pfn_req_flags =3D = *hmm_pfn; 285e871884ff3d Leon Romanovsky 2025-04-28 245 uint64_t new_pfn_flags =3D = 0; da4c3c735ea4dc J=C3=A9r=C3=B4me Glisse 2017-09-08 246 =20 5c041f5d1f23d3 Peter Xu 2022-05-12 247 if (pte_none_mostly(pte)) { 2733ea144dcce7 Jason Gunthorpe 2020-05-01 248 required_fault =3D 2733ea144dcce7 Jason Gunthorpe 2020-05-01 249 hmm_pte_need_fault(hmm_v= ma_walk, pfn_req_flags, 0); a3eb13c1579ba9 Jason Gunthorpe 2020-03-27 250 if (required_fault) 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 251 goto fault; 285e871884ff3d Leon Romanovsky 2025-04-28 252 goto out; 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 253 } 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 254 =20 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 255 if (!pte_present= (pte)) { 8d63e4cd62b258 Ralph Campbell 2018-01-31 256 swp_entry_t entry =3D pte= _to_swp_entry(pte); 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 257 =20 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 258 /* 8a295dbbaf7292 Ralph Campbell 2022-07-25 259 * Don't fault in device = private pages owned by the caller, 8a295dbbaf7292 Ralph Campbell 2022-07-25 260 * just report the PFN. 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 261 */ 8a295dbbaf7292 Ralph Campbell 2022-07-25 262 if (is_device_private_ent= ry(entry) && 82ba975e4c43d9 Alistair Popple 2025-02-28 @263 page_pgmap(pfn_swap_e= ntry_to_page(entry))->owner =3D=3D 8a295dbbaf7292 Ralph Campbell 2022-07-25 264 range->dev_private_ow= ner) { 2733ea144dcce7 Jason Gunthorpe 2020-05-01 265 cpu_flags =3D HMM_PFN_VA= LID; 4dd845b5a3e57a Alistair Popple 2021-06-30 266 if (is_writable_device_p= rivate_entry(entry)) 2733ea144dcce7 Jason Gunthorpe 2020-05-01 267 cpu_flags |=3D HMM_PFN_= WRITE; 285e871884ff3d Leon Romanovsky 2025-04-28 268 new_pfn_flags =3D swp_of= fset_pfn(entry) | cpu_flags; 285e871884ff3d Leon Romanovsky 2025-04-28 269 goto out; 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 270 } 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 271 =20 2733ea144dcce7 Jason Gunthorpe 2020-05-01 272 required_fault =3D 2733ea144dcce7 Jason Gunthorpe 2020-05-01 273 hmm_pte_need_fault(hmm_v= ma_walk, pfn_req_flags, 0); 285e871884ff3d Leon Romanovsky 2025-04-28 274 if (!required_fault) 285e871884ff3d Leon Romanovsky 2025-04-28 275 goto out; 76612d6ce4ccd2 Jason Gunthorpe 2020-02-28 276 =20 76612d6ce4ccd2 Jason Gunthorpe 2020-02-28 277 if (!non_swap_entry(entry= )) 76612d6ce4ccd2 Jason Gunthorpe 2020-02-28 278 goto fault; 76612d6ce4ccd2 Jason Gunthorpe 2020-02-28 279 =20 8a295dbbaf7292 Ralph Campbell 2022-07-25 280 if (is_device_private_ent= ry(entry)) 8a295dbbaf7292 Ralph Campbell 2022-07-25 281 goto fault; 8a295dbbaf7292 Ralph Campbell 2022-07-25 282 =20 b756a3b5e7ead8 Alistair Popple 2021-06-30 283 if (is_device_exclusive_e= ntry(entry)) b756a3b5e7ead8 Alistair Popple 2021-06-30 284 goto fault; b756a3b5e7ead8 Alistair Popple 2021-06-30 285 =20 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 286 if (is_migratio= n_entry(entry)) { 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 287 pte_unmap(ptep= ); 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 288 hmm_vma_walk->= last =3D addr; d2e8d551165ccb Ralph Campbell 2019-07-25 289 migration_entry_wait(wal= k->mm, pmdp, addr); 73231612dc7c90 J=C3=A9r=C3=B4me Glisse 2019-05-13 290 return -EBUSY; 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 291 } 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 292 =20 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 293 /* Report error= for everything else */ dfdc22078f3f06 Jason Gunthorpe 2020-02-28 294 pte_unmap(ptep); 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 295 return -EFAULT; da4c3c735ea4dc J=C3=A9r=C3=B4me Glisse 2017-09-08 296 } da4c3c735ea4dc J=C3=A9r=C3=B4me Glisse 2017-09-08 297 =20 76612d6ce4ccd2 Jason Gunthorpe 2020-02-28 298 cpu_flags =3D pte_to_hmm_p= fn_flags(range, pte); 2733ea144dcce7 Jason Gunthorpe 2020-05-01 299 required_fault =3D 2733ea144dcce7 Jason Gunthorpe 2020-05-01 300 hmm_pte_need_fault(hmm_vm= a_walk, pfn_req_flags, cpu_flags); a3eb13c1579ba9 Jason Gunthorpe 2020-03-27 301 if (required_fault) 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 302 goto fault; 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 303 =20 ac541f25037229 Ralph Campbell 2019-10-23 304 /* 40550627492291 Jason Gunthorpe 2020-03-05 305 * Since each architecture= defines a struct page for the zero page, just 40550627492291 Jason Gunthorpe 2020-03-05 306 * fall through and treat = it like a normal page. ac541f25037229 Ralph Campbell 2019-10-23 307 */ 87c01d57fa23de Alistair Popple 2022-01-14 308 if (!vm_normal_page(walk->= vma, addr, pte) && 4b42fb213678d2 Li Zhijian 2021-09-08 309 !is_zero_pfn(pte_pfn(p= te))) { 2733ea144dcce7 Jason Gunthorpe 2020-05-01 310 if (hmm_pte_need_fault(hm= m_vma_walk, pfn_req_flags, 0)) { 40550627492291 Jason Gunthorpe 2020-03-05 311 pte_unmap(ptep); 40550627492291 Jason Gunthorpe 2020-03-05 312 return -EFAULT; 40550627492291 Jason Gunthorpe 2020-03-05 313 } 285e871884ff3d Leon Romanovsky 2025-04-28 314 new_pfn_flags =3D HMM_PFN= _ERROR; 285e871884ff3d Leon Romanovsky 2025-04-28 315 goto out; ac541f25037229 Ralph Campbell 2019-10-23 316 } 992de9a8b75116 J=C3=A9r=C3=B4me Glisse 2019-05-13 317 =20 285e871884ff3d Leon Romanovsky 2025-04-28 318 new_pfn_flags =3D pte_pfn(= pte) | cpu_flags; 285e871884ff3d Leon Romanovsky 2025-04-28 319 out: 285e871884ff3d Leon Romanovsky 2025-04-28 320 *hmm_pfn =3D (*hmm_pfn & H= MM_PFN_INOUT_FLAGS) | new_pfn_flags; 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 321 return 0; 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 322 =20 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 323 fault: 74eee180b935fc J=C3=A9r=C3=B4me Glisse 2017-09-08 324 pte_unmap(ptep); 5504ed29692faa J=C3=A9r=C3=B4me Glisse 2018-04-10 325 /* Fault any vir= tual address we were asked to fault */ a3eb13c1579ba9 Jason Gunthorpe 2020-03-27 326 return hmm_vma_fault(addr,= end, required_fault, walk); 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 327 } 53f5c3f489ecdd J=C3=A9r=C3=B4me Glisse 2018-04-10 328 =20 :::::: The code at line 263 was first introduced by commit :::::: 82ba975e4c43d98afebced82d940ddb7aec42a9d mm: allow compound zone dev= ice pages :::::: TO: Alistair Popple :::::: CC: Andrew Morton --=20 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki