From: kernel test robot <lkp@intel.com>
To: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Mike Rapoport <rppt@kernel.org>
Subject: [rppt:uffd+guestmemfd/v1 4/5] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:376:10: error: use of undeclared identifier 'VM_FAULT_USERFAULTFD'
Date: Sat, 22 Nov 2025 21:49:47 +0800 [thread overview]
Message-ID: <202511222133.qIuQVc3r-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git uffd+guestmemfd/v1
head: 37911e172b33e52e4e224da52775c714483c8a90
commit: bf20f42e7ef8a03b1df8aca27e5159b87f7d40ea [4/5] guest_memfd: add support for userfaultfd minor mode
config: x86_64-randconfig-075-20251122 (https://download.01.org/0day-ci/archive/20251122/202511222133.qIuQVc3r-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251122/202511222133.qIuQVc3r-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511222133.qIuQVc3r-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:376:10: error: use of undeclared identifier 'VM_FAULT_USERFAULTFD'
376 | return VM_FAULT_USERFAULTFD;
| ^
1 error generated.
vim +/VM_FAULT_USERFAULTFD +376 arch/x86/kvm/../../../virt/kvm/guest_memfd.c
350
351 static vm_fault_t kvm_gmem_fault_user_mapping(struct vm_fault *vmf)
352 {
353 struct inode *inode = file_inode(vmf->vma->vm_file);
354 struct folio *folio;
355 vm_fault_t ret = VM_FAULT_LOCKED;
356
357 if (((loff_t)vmf->pgoff << PAGE_SHIFT) >= i_size_read(inode))
358 return VM_FAULT_SIGBUS;
359
360 if (!((u64)inode->i_private & GUEST_MEMFD_FLAG_INIT_SHARED))
361 return VM_FAULT_SIGBUS;
362
363 folio = kvm_gmem_get_folio(inode, vmf->pgoff);
364 if (IS_ERR(folio)) {
365 int err = PTR_ERR(folio);
366
367 if (err == -EAGAIN)
368 return VM_FAULT_RETRY;
369
370 return vmf_error(err);
371 }
372
373 if (userfaultfd_minor(vmf->vma)) {
374 folio_unlock(folio);
375 folio_put(folio);
> 376 return VM_FAULT_USERFAULTFD;
377 }
378
379 if (WARN_ON_ONCE(folio_test_large(folio))) {
380 ret = VM_FAULT_SIGBUS;
381 goto out_folio;
382 }
383
384 if (!folio_test_uptodate(folio)) {
385 clear_highpage(folio_page(folio, 0));
386 kvm_gmem_mark_prepared(folio);
387 }
388
389 vmf->page = folio_file_page(folio, vmf->pgoff);
390
391 out_folio:
392 if (ret != VM_FAULT_LOCKED) {
393 folio_unlock(folio);
394 folio_put(folio);
395 }
396
397 return ret;
398 }
399
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-11-22 13:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202511222133.qIuQVc3r-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rppt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).