From: kernel test robot <lkp@intel.com>
To: Ackerley Tng <ackerleytng@google.com>
Cc: oe-kbuild-all@lists.linux.dev, Yan Zhao <yan.y.zhao@intel.com>
Subject: [intel-tdx:huge_page_v2 57/204] arch/s390/kvm/../../../virt/kvm/guest_memfd.c:504:35: error: 'KVM_FILTER_SHARED' undeclared
Date: Fri, 8 Aug 2025 07:50:12 +0800 [thread overview]
Message-ID: <202508080718.IbutVMGI-lkp@intel.com> (raw)
tree: https://github.com/intel/tdx.git huge_page_v2
head: 0744d0b90629d528fa94ff73dce7ceeaaed1560c
commit: cd0e3e3e24066f4045d103aa466affe1af30c385 [57/204] KVM: guest_memfd: Introduce KVM_GMEM_CONVERT_SHARED/PRIVATE ioctls
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20250808/202508080718.IbutVMGI-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250808/202508080718.IbutVMGI-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/202508080718.IbutVMGI-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/s390/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_invalidate_begin':
>> arch/s390/kvm/../../../virt/kvm/guest_memfd.c:493:43: error: storage size of 'filter' isn't known
493 | enum kvm_gfn_range_filter filter;
| ^~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:496:26: error: 'KVM_FILTER_PRIVATE' undeclared (first use in this function)
496 | filter = KVM_FILTER_PRIVATE;
| ^~~~~~~~~~~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:496:26: note: each undeclared identifier is reported only once for each function it appears in
>> arch/s390/kvm/../../../virt/kvm/guest_memfd.c:504:35: error: 'KVM_FILTER_SHARED' undeclared (first use in this function)
504 | filter |= KVM_FILTER_SHARED;
| ^~~~~~~~~~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:507:24: error: variable 'gfn_range' has initializer but incomplete type
507 | struct kvm_gfn_range gfn_range = {
| ^~~~~~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:508:26: error: 'struct kvm_gfn_range' has no member named 'start'
508 | .start = slot->base_gfn + max(pgoff, start) - pgoff,
| ^~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:508:34: warning: excess elements in struct initializer
508 | .start = slot->base_gfn + max(pgoff, start) - pgoff,
| ^~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:508:34: note: (near initialization for 'gfn_range')
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:509:26: error: 'struct kvm_gfn_range' has no member named 'end'
509 | .end = slot->base_gfn + min(pgoff + slot->npages, end) - pgoff,
| ^~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:509:32: warning: excess elements in struct initializer
509 | .end = slot->base_gfn + min(pgoff + slot->npages, end) - pgoff,
| ^~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:509:32: note: (near initialization for 'gfn_range')
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:510:26: error: 'struct kvm_gfn_range' has no member named 'slot'
510 | .slot = slot,
| ^~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:510:33: warning: excess elements in struct initializer
510 | .slot = slot,
| ^~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:510:33: note: (near initialization for 'gfn_range')
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:511:26: error: 'struct kvm_gfn_range' has no member named 'may_block'
511 | .may_block = true,
| ^~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:511:38: warning: excess elements in struct initializer
511 | .may_block = true,
| ^~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:511:38: note: (near initialization for 'gfn_range')
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:512:26: error: 'struct kvm_gfn_range' has no member named 'attr_filter'
512 | .attr_filter = filter,
| ^~~~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:512:40: warning: excess elements in struct initializer
512 | .attr_filter = filter,
| ^~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:512:40: note: (near initialization for 'gfn_range')
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:507:38: error: storage size of 'gfn_range' isn't known
507 | struct kvm_gfn_range gfn_range = {
| ^~~~~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:507:38: warning: unused variable 'gfn_range' [-Wunused-variable]
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:493:43: warning: unused variable 'filter' [-Wunused-variable]
493 | enum kvm_gfn_range_filter filter;
| ^~~~~~
arch/s390/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_create':
arch/s390/kvm/../../../virt/kvm/guest_memfd.c:1111:13: error: implicit declaration of function 'kvm_arch_vm_supports_gmem_shared_mem' [-Wimplicit-function-declaration]
1111 | if (kvm_arch_vm_supports_gmem_shared_mem(kvm))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for KVM_GENERIC_MEMORY_ATTRIBUTES
Depends on [n]: KVM_GENERIC_MMU_NOTIFIER [=n]
Selected by [y]:
- KVM_GENERIC_GMEM_POPULATE [=y]
vim +/KVM_FILTER_SHARED +504 arch/s390/kvm/../../../virt/kvm/guest_memfd.c
483
484 static void kvm_gmem_invalidate_begin(struct kvm_gmem *gmem, pgoff_t start,
485 pgoff_t end)
486 {
487 bool flush = false, found_memslot = false;
488 struct kvm_memory_slot *slot;
489 struct kvm *kvm = gmem->kvm;
490 unsigned long index;
491
492 xa_for_each_range(&gmem->bindings, index, slot, start, end - 1) {
> 493 enum kvm_gfn_range_filter filter;
494 pgoff_t pgoff = slot->gmem.pgoff;
495
496 filter = KVM_FILTER_PRIVATE;
497 if (kvm_gmem_memslot_supports_shared(slot)) {
498 /*
499 * Unmapping would also cause invalidation, but cannot
500 * rely on mmu_notifiers to do invalidation via
501 * unmapping, since memory may not be mapped to
502 * userspace.
503 */
> 504 filter |= KVM_FILTER_SHARED;
505 }
506
507 struct kvm_gfn_range gfn_range = {
508 .start = slot->base_gfn + max(pgoff, start) - pgoff,
509 .end = slot->base_gfn + min(pgoff + slot->npages, end) - pgoff,
510 .slot = slot,
511 .may_block = true,
512 .attr_filter = filter,
513 };
514
515 if (!found_memslot) {
516 found_memslot = true;
517
518 KVM_MMU_LOCK(kvm);
519 kvm_mmu_invalidate_begin(kvm);
520 }
521
522 flush |= kvm_mmu_unmap_gfn_range(kvm, &gfn_range);
523 }
524
525 if (flush)
526 kvm_flush_remote_tlbs(kvm);
527
528 if (found_memslot)
529 KVM_MMU_UNLOCK(kvm);
530 }
531
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-08-07 23: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=202508080718.IbutVMGI-lkp@intel.com \
--to=lkp@intel.com \
--cc=ackerleytng@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yan.y.zhao@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.