tree:
https://github.com/0day-ci/linux/commits/UPDATE-20210116-135743/Cun-Li/KV...
head: 78f2c3f8b1c431e97205e2bdb8a26958abf08770
commit: 78f2c3f8b1c431e97205e2bdb8a26958abf08770 KVM: update depracated and inappropriate
jump label API
date: 13 hours ago
config: x86_64-rhel-8.3-kbuiltin (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/78f2c3f8b1c431e97205e2bdb8a26958a...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
UPDATE-20210116-135743/Cun-Li/KVM-update-depracated-jump-label-API/20210111-232923
git checkout 78f2c3f8b1c431e97205e2bdb8a26958abf08770
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/asm-generic/bug.h:20,
from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/../../../virt/kvm/irqchip.c:15:
arch/x86/kvm/lapic.h: In function 'lapic_in_kernel':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:179:6: note: in expansion of macro
'static_branch_unlikely'
179 | if (static_branch_unlikely(&kvm_no_apic_vcpu))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:179:6: note: in expansion of macro
'static_branch_unlikely'
179 | if (static_branch_unlikely(&kvm_no_apic_vcpu))
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/lapic.h: In function 'kvm_apic_hw_enabled':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:188:6: note: in expansion of macro
'static_branch_unlikely'
188 | if (static_branch_unlikely(&apic_hw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:188:6: note: in expansion of macro
'static_branch_unlikely'
188 | if (static_branch_unlikely(&apic_hw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/lapic.h: In function 'kvm_apic_sw_enabled':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:197:6: note: in expansion of macro
'static_branch_unlikely'
197 | if (static_branch_unlikely(&apic_sw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:197:6: note: in expansion of macro
'static_branch_unlikely'
197 | if (static_branch_unlikely(&apic_sw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/asm-generic/bug.h:20,
from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/lapic.h: In function 'lapic_in_kernel':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:179:6: note: in expansion of macro
'static_branch_unlikely'
179 | if (static_branch_unlikely(&kvm_no_apic_vcpu))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:179:6: note: in expansion of macro
'static_branch_unlikely'
179 | if (static_branch_unlikely(&kvm_no_apic_vcpu))
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/lapic.h: In function 'kvm_apic_hw_enabled':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:188:6: note: in expansion of macro
'static_branch_unlikely'
188 | if (static_branch_unlikely(&apic_hw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:188:6: note: in expansion of macro
'static_branch_unlikely'
188 | if (static_branch_unlikely(&apic_hw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/lapic.h: In function 'kvm_apic_sw_enabled':
> include/linux/jump_label.h:470:40: error: 'struct
static_key' has no member named 'key'
470 | branch =
arch_static_branch_jump(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:197:6: note: in expansion of macro
'static_branch_unlikely'
197 | if (static_branch_unlikely(&apic_sw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: error: 'struct static_key' has no member
named 'key'
472 | branch = arch_static_branch(&(x)->key, false); \
| ^~
arch/x86/kvm/lapic.h:197:6: note: in expansion of macro
'static_branch_unlikely'
197 | if (static_branch_unlikely(&apic_sw_disabled.key))
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/asm-generic/bug.h:20,
from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/x86.c: In function 'kvm_arch_vcpu_create':
include/linux/jump_label.h:489:55: error: 'struct static_key' has no member
named 'key'
489 | #define static_branch_inc(x) static_key_slow_inc(&(x)->key)
| ^~
arch/x86/kvm/x86.c:9939:3: note: in expansion of macro 'static_branch_inc'
9939 | static_branch_inc(&kvm_no_apic_vcpu);
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_arch_vcpu_destroy':
include/linux/jump_label.h:490:55: error: 'struct static_key' has no member
named 'key'
490 | #define static_branch_dec(x) static_key_slow_dec(&(x)->key)
| ^~
arch/x86/kvm/x86.c:10068:3: note: in expansion of macro 'static_branch_dec'
10068 | static_branch_dec(&kvm_no_apic_vcpu);
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c: At top level:
> arch/x86/kvm/x86.c:10322:39: error: conflicting types for
'kvm_no_apic_vcpu'
10322 | __read_mostly
DEFINE_STATIC_KEY_FALSE(kvm_no_apic_vcpu);
| ^~~~~~~~~~~~~~~~
include/linux/jump_label.h:367:26: note: in definition of macro
'DEFINE_STATIC_KEY_FALSE'
367 | struct static_key_false name = STATIC_KEY_FALSE_INIT
| ^~~~
In file included from arch/x86/kvm/cpuid.h:5,
from arch/x86/kvm/mmu.h:7,
from arch/x86/kvm/x86.c:22:
arch/x86/kvm/x86.h:297:26: note: previous declaration of 'kvm_no_apic_vcpu' was
here
297 | extern struct static_key kvm_no_apic_vcpu;
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:20,
from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/x86.c:10323:19: error: conflicting types for 'kvm_no_apic_vcpu'
10323 | EXPORT_SYMBOL_GPL(kvm_no_apic_vcpu);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
arch/x86/kvm/x86.c:10323:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
10323 | EXPORT_SYMBOL_GPL(kvm_no_apic_vcpu);
| ^~~~~~~~~~~~~~~~~
In file included from arch/x86/kvm/cpuid.h:5,
from arch/x86/kvm/mmu.h:7,
from arch/x86/kvm/x86.c:22:
arch/x86/kvm/x86.h:297:26: note: previous declaration of 'kvm_no_apic_vcpu' was
here
297 | extern struct static_key kvm_no_apic_vcpu;
| ^~~~~~~~~~~~~~~~
vim +470 include/linux/jump_label.h
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 465
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 466 #define static_branch_unlikely(x) \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 467 ({ \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 468 bool branch; \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 469 if
(__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 @470 branch =
arch_static_branch_jump(&(x)->key, false); \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 471 else if
(__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 472 branch =
arch_static_branch(&(x)->key, false); \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 473 else \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 474 branch =
____wrong_branch_error(); \
81dcf89f03204d7e Peter Zijlstra 2018-01-18 475 unlikely(branch); \
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 476 })
11276d5306b8e5b4 Peter Zijlstra 2015-07-24 477
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org