From: kernel test robot <lkp@intel.com>
To: ankita@nvidia.com, jgg@nvidia.com, alex.williamson@redhat.com,
naoya.horiguchi@nec.com, maz@kernel.org, oliver.upton@linux.dev
Cc: oe-kbuild-all@lists.linux.dev, aniketa@nvidia.com,
cjia@nvidia.com, kwankhede@nvidia.com, targupta@nvidia.com,
vsethi@nvidia.com, acurrid@nvidia.com, apopple@nvidia.com,
jhubbard@nvidia.com, danw@nvidia.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org
Subject: Re: [PATCH v3 3/6] mm: handle poisoning of pfn without struct pages
Date: Thu, 6 Apr 2023 05:07:56 +0800 [thread overview]
Message-ID: <202304060452.tpNrPK39-lkp@intel.com> (raw)
In-Reply-To: <20230405180134.16932-4-ankita@nvidia.com>
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on awilliam-vfio/for-linus]
[also build test ERROR on kvmarm/next akpm-mm/mm-everything linus/master v6.3-rc5]
[cannot apply to awilliam-vfio/next next-20230405]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/ankita-nvidia-com/kvm-determine-memory-type-from-VMA/20230406-020404
base: https://github.com/awilliam/linux-vfio.git for-linus
patch link: https://lore.kernel.org/r/20230405180134.16932-4-ankita%40nvidia.com
patch subject: [PATCH v3 3/6] mm: handle poisoning of pfn without struct pages
config: x86_64-randconfig-a015-20230403 (https://download.01.org/0day-ci/archive/20230406/202304060452.tpNrPK39-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/25466c8c2fa22d39a08721a24f0cf3bc3059417b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review ankita-nvidia-com/kvm-determine-memory-type-from-VMA/20230406-020404
git checkout 25466c8c2fa22d39a08721a24f0cf3bc3059417b
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304060452.tpNrPK39-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: vmlinux.o: in function `memory_failure_pfn':
>> mm/memory-failure.c:2124: undefined reference to `interval_tree_iter_first'
>> ld: mm/memory-failure.c:2125: undefined reference to `interval_tree_iter_next'
ld: vmlinux.o: in function `register_pfn_address_space':
>> mm/memory-failure.c:2087: undefined reference to `interval_tree_insert'
ld: vmlinux.o: in function `unregister_pfn_address_space':
>> mm/memory-failure.c:2105: undefined reference to `interval_tree_remove'
vim +2124 mm/memory-failure.c
2065
2066 /**
2067 * register_pfn_address_space - Register PA region for poison notification.
2068 * @pfn_space: structure containing region range and callback function on
2069 * poison detection.
2070 *
2071 * This function is called by a kernel module to register a PA region and
2072 * a callback function with the kernel. On detection of poison, the
2073 * kernel code will go through all registered regions and call the
2074 * appropriate callback function associated with the range. The kernel
2075 * module is responsible for tracking the poisoned pages.
2076 *
2077 * Return: 0 if successfully registered,
2078 * -EBUSY if the region is already registered
2079 */
2080 int register_pfn_address_space(struct pfn_address_space *pfn_space)
2081 {
2082 if (!request_mem_region(pfn_space->node.start << PAGE_SHIFT,
2083 (pfn_space->node.last - pfn_space->node.start + 1) << PAGE_SHIFT, ""))
2084 return -EBUSY;
2085
2086 mutex_lock(&pfn_space_lock);
> 2087 interval_tree_insert(&pfn_space->node, &pfn_space_itree);
2088 mutex_unlock(&pfn_space_lock);
2089
2090 return 0;
2091 }
2092 EXPORT_SYMBOL_GPL(register_pfn_address_space);
2093
2094 /**
2095 * unregister_pfn_address_space - Unregister a PA region from poison
2096 * notification.
2097 * @pfn_space: structure containing region range to be unregistered.
2098 *
2099 * This function is called by a kernel module to unregister the PA region
2100 * from the kernel from poison tracking.
2101 */
2102 void unregister_pfn_address_space(struct pfn_address_space *pfn_space)
2103 {
2104 mutex_lock(&pfn_space_lock);
> 2105 interval_tree_remove(&pfn_space->node, &pfn_space_itree);
2106 mutex_unlock(&pfn_space_lock);
2107 release_mem_region(pfn_space->node.start << PAGE_SHIFT,
2108 (pfn_space->node.last - pfn_space->node.start + 1) << PAGE_SHIFT);
2109 }
2110 EXPORT_SYMBOL_GPL(unregister_pfn_address_space);
2111
2112 static int memory_failure_pfn(unsigned long pfn, int flags)
2113 {
2114 struct interval_tree_node *node;
2115 int rc = -EBUSY;
2116 LIST_HEAD(tokill);
2117
2118 mutex_lock(&pfn_space_lock);
2119 /*
2120 * Modules registers with MM the address space mapping to the device memory they
2121 * manage. Iterate to identify exactly which address space has mapped to this
2122 * failing PFN.
2123 */
> 2124 for (node = interval_tree_iter_first(&pfn_space_itree, pfn, pfn); node;
> 2125 node = interval_tree_iter_next(node, pfn, pfn)) {
2126 struct pfn_address_space *pfn_space =
2127 container_of(node, struct pfn_address_space, node);
2128 rc = 0;
2129
2130 /*
2131 * Modules managing the device memory needs to be conveyed about the
2132 * memory failure so that the poisoned PFN can be tracked.
2133 */
2134 pfn_space->ops->failure(pfn_space, pfn);
2135
2136 collect_procs_pgoff(NULL, pfn_space->mapping, pfn, &tokill);
2137
2138 unmap_mapping_range(pfn_space->mapping, pfn << PAGE_SHIFT,
2139 PAGE_SIZE, 0);
2140 }
2141 mutex_unlock(&pfn_space_lock);
2142
2143 /*
2144 * Unlike System-RAM there is no possibility to swap in a different
2145 * physical page at a given virtual address, so all userspace
2146 * consumption of direct PFN memory necessitates SIGBUS (i.e.
2147 * MF_MUST_KILL)
2148 */
2149 flags |= MF_ACTION_REQUIRED | MF_MUST_KILL;
2150 kill_procs(&tokill, true, false, pfn, flags);
2151
2152 pr_err("%#lx: recovery action for %s: %s\n",
2153 pfn, action_page_types[MF_MSG_PFN],
2154 action_name[rc ? MF_FAILED : MF_RECOVERED]);
2155
2156 return rc;
2157 }
2158
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-05 21:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 18:01 [PATCH v3 0/6] Expose GPU memory as coherently CPU accessible ankita
2023-04-05 18:01 ` [PATCH v3 1/6] kvm: determine memory type from VMA ankita
2023-04-12 12:43 ` Marc Zyngier
2023-04-12 13:01 ` Jason Gunthorpe
2023-05-31 11:35 ` Catalin Marinas
2023-06-14 12:44 ` Jason Gunthorpe
2023-07-14 8:10 ` Benjamin Herrenschmidt
2023-07-16 15:09 ` Catalin Marinas
2023-07-16 22:30 ` Jason Gunthorpe
2023-07-17 18:35 ` Alex Williamson
2023-07-25 6:18 ` Benjamin Herrenschmidt
2023-04-05 18:01 ` [PATCH v3 2/6] vfio/nvgpu: expose GPU device memory as BAR1 ankita
2023-04-05 21:07 ` kernel test robot
2023-04-05 18:01 ` [PATCH v3 3/6] mm: handle poisoning of pfn without struct pages ankita
2023-04-05 21:07 ` kernel test robot [this message]
2023-05-09 9:51 ` HORIGUCHI NAOYA(堀口 直也)
2023-05-15 11:18 ` Ankit Agrawal
2023-05-23 5:43 ` HORIGUCHI NAOYA(堀口 直也)
2023-04-05 18:01 ` [PATCH v3 4/6] mm: Add poison error check in fixup_user_fault() for mapped PFN ankita
2023-04-05 18:01 ` [PATCH v3 5/6] mm: Change ghes code to allow poison of non-struct PFN ankita
2023-04-05 18:01 ` [PATCH v3 6/6] vfio/nvgpu: register device memory for poison handling ankita
2023-04-05 20:24 ` Zhi Wang
2023-04-05 21:50 ` kernel test robot
2023-05-24 9:53 ` Dan Carpenter
2023-04-06 12:07 ` [PATCH v3 0/6] Expose GPU memory as coherently CPU accessible David Hildenbrand
2023-04-12 8:43 ` Ankit Agrawal
2023-04-12 9:48 ` Marc Zyngier
2023-04-12 12:28 ` Marc Zyngier
2023-04-12 12:53 ` Jason Gunthorpe
2023-04-13 9:52 ` Marc Zyngier
2023-04-13 13:19 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202304060452.tpNrPK39-lkp@intel.com \
--to=lkp@intel.com \
--cc=acurrid@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=aniketa@nvidia.com \
--cc=ankita@nvidia.com \
--cc=apopple@nvidia.com \
--cc=cjia@nvidia.com \
--cc=danw@nvidia.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maz@kernel.org \
--cc=naoya.horiguchi@nec.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oliver.upton@linux.dev \
--cc=targupta@nvidia.com \
--cc=vsethi@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox