[PATCH v2] RISC-V: KVM: Add kvm-riscv.wfi_trap_policy to control VS-mode WFI trapping
kernel test robot
lkp at intel.com
Tue Aug 4 22:11:09 PDT 2026
Hi Yuhang.Chen,
kernel test robot noticed the following build errors:
[auto build test ERROR on kvm/queue]
[also build test ERROR on kvm/next mst-vhost/linux-next linus/master v7.2-rc6 next-20260804]
[cannot apply to kvm/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yuhang-Chen/RISC-V-KVM-Add-kvm-riscv-wfi_trap_policy-to-control-VS-mode-WFI-trapping/20260805-030043
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/20260804024707.2400404-1-yhchen312%40gmail.com
patch subject: [PATCH v2] RISC-V: KVM: Add kvm-riscv.wfi_trap_policy to control VS-mode WFI trapping
config: riscv-randconfig-001-20260805 (https://download.01.org/0day-ci/archive/20260805/202608051354.KYOXP5po-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260805/202608051354.KYOXP5po-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608051354.KYOXP5po-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> arch/riscv/kvm/vcpu.c:60:13: error: expected declaration specifiers or '...' before string constant
early_param("kvm-riscv.wfi_trap_policy", early_kvm_riscv_wfi_trap_policy_cfg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kvm/vcpu.c:60:42: error: expected declaration specifiers or '...' before 'early_kvm_riscv_wfi_trap_policy_cfg'
early_param("kvm-riscv.wfi_trap_policy", early_kvm_riscv_wfi_trap_policy_cfg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kvm/vcpu.c:43:19: warning: 'early_kvm_riscv_wfi_trap_policy_cfg' defined but not used [-Wunused-function]
static int __init early_kvm_riscv_wfi_trap_policy_cfg(char *arg)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +60 arch/riscv/kvm/vcpu.c
39
40 static enum kvm_riscv_wfi_trap_policy kvm_riscv_wfi_trap_policy __read_mostly =
41 KVM_RISCV_WFI_TRAP;
42
> 43 static int __init early_kvm_riscv_wfi_trap_policy_cfg(char *arg)
44 {
45 if (!arg)
46 return -EINVAL;
47
48 if (strcmp(arg, "trap") == 0) {
49 kvm_riscv_wfi_trap_policy = KVM_RISCV_WFI_TRAP;
50 return 0;
51 }
52
53 if (strcmp(arg, "auto") == 0) {
54 kvm_riscv_wfi_trap_policy = KVM_RISCV_WFI_AUTO;
55 return 0;
56 }
57
58 return -EINVAL;
59 }
> 60 early_param("kvm-riscv.wfi_trap_policy", early_kvm_riscv_wfi_trap_policy_cfg);
61
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the kvm-riscv
mailing list