Hi David,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc1 next-20200618]
[cannot apply to kvmarm/next arm64/for-next/core arm-perf/for-next/perf]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/David-Brazdil/Split-off-nVHE-hyp...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
1b5044021070efa3259f3e9548dc35d1eb6aa844
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/kvm_host.h:36,
from arch/arm64/kvm/arm.c:11:
arch/arm64/kvm/arm.c: In function 'kvm_arch_vcpu_ioctl_run':
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/arm.c:754:10: note: in expansion of macro
'kvm_call_hyp_ret'
754 | ret = kvm_call_hyp_ret(__kvm_vcpu_run_nvhe,
vcpu);
| ^~~~~~~~~~~~~~~~
--
In file included from arch/arm64/include/asm/percpu.h:228,
from arch/arm64/include/asm/smp.h:28,
from include/linux/smp.h:89,
from include/linux/percpu.h:7,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/arm64/kvm/debug.c:9:
arch/arm64/kvm/debug.c: In function 'kvm_arm_init_debug':
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
include/asm-generic/percpu.h:72:26: note: in definition of macro
'raw_cpu_generic_to_op'
72 | *raw_cpu_ptr(&(pcp)) op val; | ^~~
include/linux/percpu-defs.h:377:11: note: in expansion of macro 'raw_cpu_write_1'
377 | case 1: stem##1(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:421:34: note: in expansion of macro
'__pcpu_size_call'
421 | #define raw_cpu_write(pcp, val) __pcpu_size_call(raw_cpu_write_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:452:2: note: in expansion of macro 'raw_cpu_write'
452 | raw_cpu_write(pcp, val); | ^~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:2: note: in expansion of macro
'__this_cpu_write'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:29: note: in expansion of macro
'kvm_call_hyp_ret'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
include/asm-generic/percpu.h:72:26: note: in definition of macro
'raw_cpu_generic_to_op'
72 | *raw_cpu_ptr(&(pcp)) op val; | ^~~
include/linux/percpu-defs.h:378:11: note: in expansion of macro 'raw_cpu_write_2'
378 | case 2: stem##2(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:421:34: note: in expansion of macro
'__pcpu_size_call'
421 | #define raw_cpu_write(pcp, val) __pcpu_size_call(raw_cpu_write_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:452:2: note: in expansion of macro 'raw_cpu_write'
452 | raw_cpu_write(pcp, val); | ^~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:2: note: in expansion of macro
'__this_cpu_write'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:29: note: in expansion of macro
'kvm_call_hyp_ret'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
include/asm-generic/percpu.h:72:26: note: in definition of macro
'raw_cpu_generic_to_op'
72 | *raw_cpu_ptr(&(pcp)) op val; | ^~~
include/linux/percpu-defs.h:379:11: note: in expansion of macro 'raw_cpu_write_4'
379 | case 4: stem##4(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:421:34: note: in expansion of macro
'__pcpu_size_call'
421 | #define raw_cpu_write(pcp, val) __pcpu_size_call(raw_cpu_write_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:452:2: note: in expansion of macro 'raw_cpu_write'
452 | raw_cpu_write(pcp, val); | ^~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:2: note: in expansion of macro
'__this_cpu_write'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:29: note: in expansion of macro
'kvm_call_hyp_ret'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
include/asm-generic/percpu.h:72:26: note: in definition of macro
'raw_cpu_generic_to_op'
72 | *raw_cpu_ptr(&(pcp)) op val; | ^~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'raw_cpu_write_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:421:34: note: in expansion of macro
'__pcpu_size_call'
421 | #define raw_cpu_write(pcp, val) __pcpu_size_call(raw_cpu_write_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:452:2: note: in expansion of macro 'raw_cpu_write'
452 | raw_cpu_write(pcp, val); | ^~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:2: note: in expansion of macro
'__this_cpu_write'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/debug.c:68:29: note: in expansion of macro
'kvm_call_hyp_ret'
68 | __this_cpu_write(mdcr_el2,
kvm_call_hyp_ret(__kvm_get_mdcr_el2));
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/kvm_host.h:36,
from arch/arm64/kvm/vgic/vgic-v3.c:5:
arch/arm64/kvm/vgic/vgic-v3.c: In function 'vgic_v3_probe':
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kvm/vgic/vgic-v3.c:586:20: note: in expansion of macro
'kvm_call_hyp_ret'
586 | u32 ich_vtr_el2 =
kvm_call_hyp_ret(__vgic_v3_get_ich_vtr_el2);
| ^~~~~~~~~~~~~~~~
arch/arm64/kvm/vgic/vgic-v3.c: In function 'vgic_v3_vmcr_sync':
> arch/arm64/include/asm/kvm_host.h:460:26: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
460 |
typeof(f(__VA_ARGS__)) ret; | ^~~
> arch/arm64/include/asm/kvm_host.h:488:10: note: in expansion of
macro 'kvm_call_hyp_nvhe_ret'
488 | ret = kvm_call_hyp_nvhe_ret(f,
##__VA_ARGS__); | ^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/vgic/vgic-v3.c:678:23: note: in expansion of macro
'kvm_call_hyp_ret'
678 | cpu_if->vgic_vmcr = kvm_call_hyp_ret(__vgic_v3_read_vmcr);
| ^~~~~~~~~~~~~~~~
vim +/ret +460 arch/arm64/include/asm/kvm_host.h
450
451 #define kvm_call_hyp_nvhe(f, ...) \
452 do { \
453 DECLARE_KVM_NVHE_SYM(f); \
454 __kvm_call_hyp(kvm_ksym_ref_nvhe(f), ##__VA_ARGS__); \
455 } while(0)
456
457 #define kvm_call_hyp_nvhe_ret(f, ...) \
458 ({ \
459 DECLARE_KVM_NVHE_SYM(f); \
460 typeof(f(__VA_ARGS__)) ret; \
461 ret =
__kvm_call_hyp(kvm_ksym_ref_nvhe(f), \
462 ##__VA_ARGS__); \
463 })
464
465 /*
466 * The couple of isb() below are there to guarantee the same behaviour
467 * on VHE as on !VHE, where the eret to EL1 acts as a context
468 * synchronization event.
469 */
470 #define kvm_call_hyp(f, ...) \
471 do { \
472 if (has_vhe()) { \
473 f(__VA_ARGS__); \
474 isb(); \
475 } else { \
476 kvm_call_hyp_nvhe(f, ##__VA_ARGS__); \
477 } \
478 } while(0)
479
480 #define kvm_call_hyp_ret(f, ...) \
481 ({ \
482 typeof(f(__VA_ARGS__)) ret; \
483 \
484 if (has_vhe()) { \
485 ret = f(__VA_ARGS__); \
486 isb(); \
487 } else { \
488 ret = kvm_call_hyp_nvhe_ret(f, ##__VA_ARGS__); \
489 } \
490 \
491 ret; \
492 })
493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org