lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202410091226.UPCqIMOd-lkp@intel.com>
Date: Wed, 9 Oct 2024 12:17:33 +0800
From: kernel test robot <lkp@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: arch/x86/kvm/svm/svm.c:597:2: error: use of undeclared identifier
 'kvm_rebooting'

Hi Paolo,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   75b607fab38d149f232f01eae5e6392b394dd659
commit: ea4290d77bda2bd1f173a86f07aa79b568e0a6f8 KVM: x86: leave kvm.ko out of the build if no vendor module is requested
date:   3 days ago
config: i386-randconfig-012-20241009 (https://download.01.org/0day-ci/archive/20241009/202410091226.UPCqIMOd-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241009/202410091226.UPCqIMOd-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410091226.UPCqIMOd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/svm/svm.c:597:2: error: use of undeclared identifier 'kvm_rebooting'
     597 |         kvm_rebooting = true;
         |         ^
   1 error generated.
--
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:10: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                 ^
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:31: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                      ^
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:466:13: note: expanded from macro '__unqual_scalar_typeof'
     466 |                 _Generic((x),                                           \
         |                           ^
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:473:15: note: expanded from macro '__unqual_scalar_typeof'
     473 |                          default: (x)))
         |                                    ^
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
>> arch/x86/kvm/svm/avic.c:909:33: error: no member named 'irq_routing' in 'struct kvm'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:530:12: note: expanded from macro '__rcu_dereference_check'
     530 |         ((typeof(*p) __force __kernel *)(local)); \
         |                   ^
>> arch/x86/kvm/svm/avic.c:909:9: error: assigning to 'struct kvm_irq_routing_table *' from incompatible type 'void'
     909 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/svm/avic.c:911:25: error: incomplete definition of type 'struct kvm_irq_routing_table'
     911 |         if (guest_irq >= irq_rt->nr_rt_entries ||
         |                          ~~~~~~^
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/svm/avic.c:912:22: error: incomplete definition of type 'struct kvm_irq_routing_table'
     912 |                 hlist_empty(&irq_rt->map[guest_irq])) {
         |                              ~~~~~~^
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/svm/avic.c:914:26: error: incomplete definition of type 'struct kvm_irq_routing_table'
     914 |                              guest_irq, irq_rt->nr_rt_entries);
         |                                         ~~~~~~^
   include/linux/printk.h:623:42: note: expanded from macro 'pr_warn_once'
     623 |         printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |                                                 ^~~~~~~~~~~
   include/linux/printk.h:604:30: note: expanded from macro 'printk_once'
     604 |         DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__)
         |                                     ^~~~~~~~~~~
   include/linux/once_lite.h:11:32: note: expanded from macro 'DO_ONCE_LITE'
      11 |         DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__)
         |                                       ^~~~~~~~~~~
   include/linux/once_lite.h:31:9: note: expanded from macro 'DO_ONCE_LITE_IF'
      31 |                         func(__VA_ARGS__);                              \
         |                              ^~~~~~~~~~~
   include/linux/printk.h:465:60: note: expanded from macro 'printk'
     465 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                            ^~~~~~~~~~~
   include/linux/printk.h:437:19: note: expanded from macro 'printk_index_wrap'
     437 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/svm/avic.c:918:33: error: incomplete definition of type 'struct kvm_irq_routing_table'
     918 |         hlist_for_each_entry(e, &irq_rt->map[guest_irq], link) {
         |                                  ~~~~~~^
   include/linux/list.h:1163:31: note: expanded from macro 'hlist_for_each_entry'
    1163 |         for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
         |                                      ^~~~
   include/linux/list.h:1152:12: note: expanded from macro 'hlist_entry_safe'
    1152 |         ({ typeof(ptr) ____ptr = (ptr); \
         |                   ^~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/svm/avic.c:918:33: error: incomplete definition of type 'struct kvm_irq_routing_table'
     918 |         hlist_for_each_entry(e, &irq_rt->map[guest_irq], link) {
         |                                  ~~~~~~^
   include/linux/list.h:1163:31: note: expanded from macro 'hlist_for_each_entry'
    1163 |         for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
         |                                      ^~~~
   include/linux/list.h:1152:28: note: expanded from macro 'hlist_entry_safe'
    1152 |         ({ typeof(ptr) ____ptr = (ptr); \
         |                                   ^~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   17 errors generated.
--
>> arch/x86/kvm/vmx/posted_intr.c:178:3: error: call to undeclared function '__apic_send_IPI_self'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     178 |                 __apic_send_IPI_self(POSTED_INTR_WAKEUP_VECTOR);
         |                 ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:10: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                 ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:31: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                      ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^~~~~~~~~
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^~~~~~~~~
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:466:13: note: expanded from macro '__unqual_scalar_typeof'
     466 |                 _Generic((x),                                           \
         |                           ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:473:15: note: expanded from macro '__unqual_scalar_typeof'
     473 |                          default: (x)))
         |                                    ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:527:53: note: expanded from macro '__rcu_dereference_check'
     527 |         typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
         |                                                            ^
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
>> arch/x86/kvm/vmx/posted_intr.c:286:33: error: no member named 'irq_routing' in 'struct kvm'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                                   ~~~  ^
   include/linux/srcu.h:217:58: note: expanded from macro 'srcu_dereference'
     217 | #define srcu_dereference(p, ssp) srcu_dereference_check((p), (ssp), 0)
         |                                                          ^
   include/linux/srcu.h:204:27: note: expanded from macro 'srcu_dereference_check'
     204 |         __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
         |                                  ^
   include/linux/rcupdate.h:530:12: note: expanded from macro '__rcu_dereference_check'
     530 |         ((typeof(*p) __force __kernel *)(local)); \
         |                   ^
>> arch/x86/kvm/vmx/posted_intr.c:286:9: error: assigning to 'struct kvm_irq_routing_table *' from incompatible type 'void'
     286 |         irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu);
         |                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/posted_intr.c:287:25: error: incomplete definition of type 'struct kvm_irq_routing_table'
     287 |         if (guest_irq >= irq_rt->nr_rt_entries ||
         |                          ~~~~~~^
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/vmx/posted_intr.c:288:25: error: incomplete definition of type 'struct kvm_irq_routing_table'
     288 |             hlist_empty(&irq_rt->map[guest_irq])) {
         |                          ~~~~~~^
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/vmx/posted_intr.c:290:26: error: incomplete definition of type 'struct kvm_irq_routing_table'
     290 |                              guest_irq, irq_rt->nr_rt_entries);
         |                                         ~~~~~~^
   include/linux/printk.h:623:42: note: expanded from macro 'pr_warn_once'
     623 |         printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |                                                 ^~~~~~~~~~~
   include/linux/printk.h:604:30: note: expanded from macro 'printk_once'
     604 |         DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__)
         |                                     ^~~~~~~~~~~
   include/linux/once_lite.h:11:32: note: expanded from macro 'DO_ONCE_LITE'
      11 |         DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__)
         |                                       ^~~~~~~~~~~
   include/linux/once_lite.h:31:9: note: expanded from macro 'DO_ONCE_LITE_IF'
      31 |                         func(__VA_ARGS__);                              \
         |                              ^~~~~~~~~~~
   include/linux/printk.h:465:60: note: expanded from macro 'printk'
     465 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                            ^~~~~~~~~~~
   include/linux/printk.h:437:19: note: expanded from macro 'printk_index_wrap'
     437 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                                 ^~~~~~~~~~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/vmx/posted_intr.c:294:33: error: incomplete definition of type 'struct kvm_irq_routing_table'
     294 |         hlist_for_each_entry(e, &irq_rt->map[guest_irq], link) {
         |                                  ~~~~~~^
   include/linux/list.h:1163:31: note: expanded from macro 'hlist_for_each_entry'
    1163 |         for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
         |                                      ^~~~
   include/linux/list.h:1152:12: note: expanded from macro 'hlist_entry_safe'
    1152 |         ({ typeof(ptr) ____ptr = (ptr); \
         |                   ^~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   arch/x86/kvm/vmx/posted_intr.c:294:33: error: incomplete definition of type 'struct kvm_irq_routing_table'
     294 |         hlist_for_each_entry(e, &irq_rt->map[guest_irq], link) {
         |                                  ~~~~~~^
   include/linux/list.h:1163:31: note: expanded from macro 'hlist_for_each_entry'
    1163 |         for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
         |                                      ^~~~
   include/linux/list.h:1152:28: note: expanded from macro 'hlist_entry_safe'
    1152 |         ({ typeof(ptr) ____ptr = (ptr); \
         |                                   ^~~
   include/linux/kvm_types.h:11:8: note: forward declaration of 'struct kvm_irq_routing_table'
      11 | struct kvm_irq_routing_table;
         |        ^
   18 errors generated.
..


vim +/kvm_rebooting +597 arch/x86/kvm/svm/svm.c

76ab8161083bfd Sean Christopherson 2023-07-21  594  
0617a769ce16b8 Sean Christopherson 2024-08-29  595  static void svm_emergency_disable_virtualization_cpu(void)
baeb4de7ad12b7 Sean Christopherson 2023-07-21  596  {
6ae44e012f4c35 Sean Christopherson 2023-07-21 @597  	kvm_rebooting = true;
6ae44e012f4c35 Sean Christopherson 2023-07-21  598  
76ab8161083bfd Sean Christopherson 2023-07-21  599  	kvm_cpu_svm_disable();
11d39e8cc43e1c Maxim Levitsky      2022-06-06  600  }
11d39e8cc43e1c Maxim Levitsky      2022-06-06  601  

:::::: The code at line 597 was first introduced by commit
:::::: 6ae44e012f4c35fb67bc61bd0bf1b3c5f504d931 KVM: x86: Force kvm_rebooting=true during emergency reboot/crash

:::::: TO: Sean Christopherson <seanjc@...gle.com>
:::::: CC: Sean Christopherson <seanjc@...gle.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ