From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [sean-jc:x86/unfudge_irq_bypass 73/108] arch/x86/kvm/irq.c:526:3: error: incomplete definition of type 'struct kvm_kernel_irqfd'
Date: Sat, 26 Apr 2025 05:44:38 +0800 [thread overview]
Message-ID: <202504260551.mOvE8l2q-lkp@intel.com> (raw)
tree: https://github.com/sean-jc/linux x86/unfudge_irq_bypass
head: 720265d246a28570666f9b0e027983c4bb758136
commit: 8eb00a4ec19d726d86b96a9201f0413157ce880d [73/108] KVM: x86: Move IRQ routing/delivery APIs from x86.c => irq.c
config: i386-buildonly-randconfig-004-20250426 (https://download.01.org/0day-ci/archive/20250426/202504260551.mOvE8l2q-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250426/202504260551.mOvE8l2q-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/202504260551.mOvE8l2q-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/irq.c:526:3: error: incomplete definition of type 'struct kvm_kernel_irqfd'
526 | container_of(cons, struct kvm_kernel_irqfd, consumer);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:47: note: expanded from macro 'container_of'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
21 | __same_type(*(ptr), void), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 | "pointer type mismatch in container_of()"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:498:74: note: expanded from macro '__same_type'
498 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
>> arch/x86/kvm/irq.c:526:3: error: offsetof of incomplete type 'struct kvm_kernel_irqfd'
526 | container_of(cons, struct kvm_kernel_irqfd, consumer);
| ^ ~~~~~~
include/linux/container_of.h:23:21: note: expanded from macro 'container_of'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^ ~~~~
include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^ ~~~~
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:527:25: error: incomplete definition of type 'struct kvm_kernel_irqfd'
527 | struct kvm *kvm = irqfd->kvm;
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:530:33: error: incomplete definition of type 'struct kvm_kernel_irqfd'
530 | kvm_arch_start_assignment(irqfd->kvm);
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:533:7: error: incomplete definition of type 'struct kvm_kernel_irqfd'
533 | irqfd->producer = prod;
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:535:11: error: incomplete definition of type 'struct kvm_kernel_irqfd'
535 | if (irqfd->irq_entry.type == KVM_IRQ_ROUTING_MSI) {
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:536:50: error: incomplete definition of type 'struct kvm_kernel_irqfd'
536 | ret = kvm_x86_call(pi_update_irte)(irqfd, irqfd->kvm, prod->irq,
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:537:15: error: incomplete definition of type 'struct kvm_kernel_irqfd'
537 | irqfd->gsi, &irqfd->irq_entry);
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:537:28: error: incomplete definition of type 'struct kvm_kernel_irqfd'
537 | irqfd->gsi, &irqfd->irq_entry);
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:539:33: error: incomplete definition of type 'struct kvm_kernel_irqfd'
539 | kvm_arch_end_assignment(irqfd->kvm);
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:550:3: error: incomplete definition of type 'struct kvm_kernel_irqfd'
550 | container_of(cons, struct kvm_kernel_irqfd, consumer);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:20:47: note: expanded from macro 'container_of'
20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
21 | __same_type(*(ptr), void), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 | "pointer type mismatch in container_of()"); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:498:74: note: expanded from macro '__same_type'
498 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^
include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:550:3: error: offsetof of incomplete type 'struct kvm_kernel_irqfd'
550 | container_of(cons, struct kvm_kernel_irqfd, consumer);
| ^ ~~~~~~
include/linux/container_of.h:23:21: note: expanded from macro 'container_of'
23 | ((type *)(__mptr - offsetof(type, member))); })
| ^ ~~~~
include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^ ~~~~
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:551:25: error: incomplete definition of type 'struct kvm_kernel_irqfd'
551 | struct kvm *kvm = irqfd->kvm;
| ~~~~~^
arch/x86/include/asm/kvm_host.h:299:8: note: forward declaration of 'struct kvm_kernel_irqfd'
299 | struct kvm_kernel_irqfd;
| ^
arch/x86/kvm/irq.c:554:15: error: incomplete definition of type 'struct kvm_kernel_irqfd'
vim +526 arch/x86/kvm/irq.c
521
522 int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
523 struct irq_bypass_producer *prod)
524 {
525 struct kvm_kernel_irqfd *irqfd =
> 526 container_of(cons, struct kvm_kernel_irqfd, consumer);
527 struct kvm *kvm = irqfd->kvm;
528 int ret = 0;
529
530 kvm_arch_start_assignment(irqfd->kvm);
531
532 spin_lock_irq(&kvm->irqfds.lock);
533 irqfd->producer = prod;
534
535 if (irqfd->irq_entry.type == KVM_IRQ_ROUTING_MSI) {
536 ret = kvm_x86_call(pi_update_irte)(irqfd, irqfd->kvm, prod->irq,
537 irqfd->gsi, &irqfd->irq_entry);
538 if (ret)
539 kvm_arch_end_assignment(irqfd->kvm);
540 }
541 spin_unlock_irq(&kvm->irqfds.lock);
542
543 return ret;
544 }
545
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-25 21:45 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=202504260551.mOvE8l2q-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.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