* [sean-jc:x86/unfudge_irq_bypass 76/108] arch/x86/kvm/irq.c:561:2: error: call to undeclared function 'trace_kvm_pi_irte_update'; ISO C99 and later do not support implicit function declarations
@ 2025-04-25 22:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-25 22:27 UTC (permalink / raw)
To: Sean Christopherson; +Cc: llvm, oe-kbuild-all
tree: https://github.com/sean-jc/linux x86/unfudge_irq_bypass
head: 720265d246a28570666f9b0e027983c4bb758136
commit: 1303b53ffcb5b4605471fab89174e0077d9e33d8 [76/108] KVM: x86: Move posted interrupt tracepoint to common code
config: i386-buildonly-randconfig-004-20250426 (https://download.01.org/0day-ci/archive/20250426/202504260605.T6Rt9LPf-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/202504260605.T6Rt9LPf-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/202504260605.T6Rt9LPf-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kvm/irq.c:525:31: error: incomplete definition of type 'struct kvm_kernel_irqfd'
525 | unsigned int host_irq = irqfd->producer->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:526:25: error: incomplete definition of type 'struct kvm_kernel_irqfd'
526 | 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:556:47: error: incomplete definition of type 'struct kvm_kernel_irqfd'
556 | r = kvm_x86_call(pi_update_irte)(irqfd, irqfd->kvm, host_irq, irqfd->gsi,
| ~~~~~^
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:556:69: error: incomplete definition of type 'struct kvm_kernel_irqfd'
556 | r = kvm_x86_call(pi_update_irte)(irqfd, irqfd->kvm, host_irq, irqfd->gsi,
| ~~~~~^
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:561:2: error: call to undeclared function 'trace_kvm_pi_irte_update'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
561 | trace_kvm_pi_irte_update(host_irq, vcpu, irqfd->gsi, irq.vector, !!vcpu);
| ^
arch/x86/kvm/irq.c:561:48: error: incomplete definition of type 'struct kvm_kernel_irqfd'
561 | trace_kvm_pi_irte_update(host_irq, vcpu, irqfd->gsi, irq.vector, !!vcpu);
| ~~~~~^
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:569:3: error: incomplete definition of type 'struct kvm_kernel_irqfd'
569 | 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:569:3: error: offsetof of incomplete type 'struct kvm_kernel_irqfd'
569 | 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:570:25: error: incomplete definition of type 'struct kvm_kernel_irqfd'
570 | 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:573:33: error: incomplete definition of type 'struct kvm_kernel_irqfd'
573 | 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:576:7: error: incomplete definition of type 'struct kvm_kernel_irqfd'
576 | 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:578:11: error: incomplete definition of type 'struct kvm_kernel_irqfd'
578 | 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:579:41: error: incomplete definition of type 'struct kvm_kernel_irqfd'
579 | ret = kvm_pi_update_irte(irqfd, &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:581:33: error: incomplete definition of type 'struct kvm_kernel_irqfd'
581 | 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:592:3: error: incomplete definition of type 'struct kvm_kernel_irqfd'
592 | 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;
| ^
vim +/trace_kvm_pi_irte_update +561 arch/x86/kvm/irq.c
521
522 static int kvm_pi_update_irte(struct kvm_kernel_irqfd *irqfd,
523 struct kvm_kernel_irq_routing_entry *entry)
524 {
525 unsigned int host_irq = irqfd->producer->irq;
526 struct kvm *kvm = irqfd->kvm;
527 struct kvm_vcpu *vcpu = NULL;
528 struct kvm_lapic_irq irq;
529 int r;
530
531 if (!irqchip_in_kernel(kvm) ||
532 !kvm_arch_has_irq_bypass() ||
533 !kvm_arch_has_assigned_device(kvm))
534 return 0;
535
536 if (entry && entry->type == KVM_IRQ_ROUTING_MSI) {
537 kvm_set_msi_irq(kvm, entry, &irq);
538
539 /*
540 * Force remapped mode if hardware doesn't support posting the
541 * virtual interrupt to a vCPU. Only IRQs are postable (NMIs,
542 * SMIs, etc. are not), and neither AMD nor Intel IOMMUs support
543 * posting multicast/broadcast IRQs. If the interrupt can't be
544 * posted, the device MSI needs to be routed to the host so that
545 * the guest's desired interrupt can be synthesized by KVM.
546 *
547 * This means that KVM can only post lowest-priority interrupts
548 * if they have a single CPU as the destination, e.g. only if
549 * the guest has affined the interrupt to a single vCPU.
550 */
551 if (!kvm_intr_is_single_vcpu(kvm, &irq, &vcpu) ||
552 !kvm_irq_is_postable(&irq))
553 vcpu = NULL;
554 }
555
> 556 r = kvm_x86_call(pi_update_irte)(irqfd, irqfd->kvm, host_irq, irqfd->gsi,
557 vcpu, irq.vector);
558 if (r)
559 return r;
560
> 561 trace_kvm_pi_irte_update(host_irq, vcpu, irqfd->gsi, irq.vector, !!vcpu);
562 return 0;
563 }
564
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-25 22:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 22:27 [sean-jc:x86/unfudge_irq_bypass 76/108] arch/x86/kvm/irq.c:561:2: error: call to undeclared function 'trace_kvm_pi_irte_update'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox