All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android17-6.18-2026-06 3/3] arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void
@ 2026-07-16  0:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-16  0:48 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

Hi Quentin,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android17-6.18-2026-06
head:   dddb2f587987bc109f7f6f1295336c6dc8fc8aa1
commit: 489e4bb847d0800b869c810143d2be0f635d02f3 [3/3] ANDROID: KVM: arm64: Allow memcache topup from guest SMC handler
config: arm64-randconfig-002-20260715 (https://download.01.org/0day-ci/archive/20260716/202607160818.kaG1bSbp-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260716/202607160818.kaG1bSbp-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/202607160818.kaG1bSbp-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/arm64/kvm/hyp/nvhe/mem_protect.c:21:
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |                                          ^~~~~~~~~~~~~~~~
   In file included from arch/arm64/kvm/hyp/nvhe/mem_protect.c:23:
   arch/arm64/kvm/hyp/include/nvhe/modules.h:41:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
      41 | bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:42:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
      42 | bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: error: return type is an incomplete type
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
   arch/arm64/kvm/hyp/include/nvhe/modules.h: In function 'module_handle_guest_smc':
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
      47 |         return false;
         |                ^~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: note: declared here
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c: At top level:
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1492:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
    1492 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages)
         |                                          ^~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1492:5: error: conflicting types for '__pkvm_host_donate_sglist_hyp'; have 'int(struct pkvm_sglist_page *, size_t)' {aka 'int(struct pkvm_sglist_page *, long unsigned int)'}
    1492 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:5: note: previous declaration of '__pkvm_host_donate_sglist_hyp' with type 'int(struct pkvm_sglist_page *, size_t)' {aka 'int(struct pkvm_sglist_page *, long unsigned int)'}
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/arm64/include/asm/bug.h:26,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from arch/arm64/include/asm/processor.h:35,
                    from include/linux/sched.h:13,
                    from include/linux/resume_user_mode.h:6,
                    from include/linux/entry-virt.h:6,
                    from include/linux/kvm_host.h:5,
                    from arch/arm64/kvm/hyp/nvhe/mem_protect.c:7:
   arch/arm64/kvm/hyp/nvhe/mem_protect.c: In function '__pkvm_host_donate_sglist_hyp':
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1500:76: error: invalid application of 'sizeof' to incomplete type 'struct pkvm_sglist_page'
    1500 |         WARN_ON(__hyp_check_page_state_range((u64)sglist, nr_pages * sizeof(*sglist),
         |                                                                            ^
   include/asm-generic/bug.h:123:32: note: in definition of macro 'WARN_ON'
     123 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1508:27: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1508 |                 if (sglist[p].order > max_order) {
         |                           ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1508:30: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1508 |                 if (sglist[p].order > max_order) {
         |                              ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1512:43: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1512 |                 size = PAGE_SIZE << sglist[p].order;
         |                                           ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1512:46: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1512 |                 size = PAGE_SIZE << sglist[p].order;
         |                                              ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1514:47: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1514 |                 if (!pfn_range_is_valid(sglist[p].pfn, size >> PAGE_SHIFT)) {
         |                                               ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1514:50: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1514 |                 if (!pfn_range_is_valid(sglist[p].pfn, size >> PAGE_SHIFT)) {
         |                                                  ^
   In file included from arch/arm64/kvm/hyp/include/nvhe/gfp.h:7,
                    from arch/arm64/kvm/hyp/nvhe/mem_protect.c:18:
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1518:46: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1518 |                 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                              ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1518:49: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1518 |                 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                                 ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1530:50: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1530 |                 size_t size = PAGE_SIZE << sglist[p].order;
         |                                                  ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1530:53: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1530 |                 size_t size = PAGE_SIZE << sglist[p].order;
         |                                                     ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1531:50: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1531 |                 u64 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                                  ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1531:53: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1531 |                 u64 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                                     ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1543:62: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1543 |                                 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                                              ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1543:65: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1543 |                                 phys = hyp_pfn_to_phys(sglist[p].pfn);
         |                                                                 ^
   arch/arm64/kvm/hyp/include/nvhe/memory.h:80:49: note: in definition of macro 'hyp_pfn_to_phys'
      80 | #define hyp_pfn_to_phys(pfn)    ((phys_addr_t)((pfn) << PAGE_SHIFT))
         |                                                 ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1544:59: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1544 |                                 size = PAGE_SIZE << sglist[p].order;
         |                                                           ^
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1544:62: error: invalid use of undefined type 'struct pkvm_sglist_page'
    1544 |                                 size = PAGE_SIZE << sglist[p].order;
         |                                                              ^
--
   In file included from arch/arm64/kvm/hyp/nvhe/pkvm.c:21:
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |                                          ^~~~~~~~~~~~~~~~
   In file included from arch/arm64/kvm/hyp/nvhe/pkvm.c:23:
   arch/arm64/kvm/hyp/include/nvhe/modules.h:41:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
      41 | bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:42:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
      42 | bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: error: return type is an incomplete type
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
   arch/arm64/kvm/hyp/include/nvhe/modules.h: In function 'module_handle_guest_smc':
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
      47 |         return false;
         |                ^~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: note: declared here
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/pkvm.c: In function 'module_handle_guest_trng_rng':
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1869:15: error: implicit declaration of function 'module_get_guest_trng_rng'; did you mean 'module_handle_guest_trng_rng'? [-Wimplicit-function-declaration]
    1869 |         ret = module_get_guest_trng_rng(entropy, nbits);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~
         |               module_handle_guest_trng_rng
   arch/arm64/kvm/hyp/nvhe/pkvm.c: In function 'module_handle_guest_trng':
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1888:16: error: implicit declaration of function 'module_get_guest_trng_uuid'; did you mean 'module_handle_guest_trng_rng'? [-Wimplicit-function-declaration]
    1888 |         uuid = module_get_guest_trng_uuid();
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                module_handle_guest_trng_rng
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1888:14: error: assignment to 'const uuid_t *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1888 |         uuid = module_get_guest_trng_uuid();
         |              ^
   arch/arm64/kvm/hyp/nvhe/pkvm.c: In function 'kvm_handle_pvm_smc64':
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1931:35: error: storage size of 'handler_ret' isn't known
    1931 |         enum pkvm_smc_handler_ret handler_ret;
         |                                   ^~~~~~~~~~~
>> arch/arm64/kvm/hyp/nvhe/pkvm.c:1949:21: error: invalid use of void expression
    1949 |         handler_ret = module_handle_guest_smc(&regs, &res, vm->kvm.arch.pkvm.handle);
         |                     ^
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1951:14: error: 'GUEST_SMC_HANDLED' undeclared (first use in this function)
    1951 |         case GUEST_SMC_HANDLED:
         |              ^~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1951:14: note: each undeclared identifier is reported only once for each function it appears in
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1954:14: error: 'GUEST_SMC_NOT_HANDLED' undeclared (first use in this function)
    1954 |         case GUEST_SMC_NOT_HANDLED:
         |              ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1957:14: error: 'GUEST_SMC_NEED_TOPUP' undeclared (first use in this function)
    1957 |         case GUEST_SMC_NEED_TOPUP:
         |              ^~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/pkvm.c:1931:35: warning: unused variable 'handler_ret' [-Wunused-variable]
    1931 |         enum pkvm_smc_handler_ret handler_ret;
         |                                   ^~~~~~~~~~~
--
   In file included from arch/arm64/kvm/hyp/nvhe/mm.c:18:
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |                                          ^~~~~~~~~~~~~~~~
   In file included from arch/arm64/kvm/hyp/nvhe/mm.c:20:
   arch/arm64/kvm/hyp/include/nvhe/modules.h:41:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
      41 | bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:42:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
      42 | bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: error: return type is an incomplete type
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
   arch/arm64/kvm/hyp/include/nvhe/modules.h: In function 'module_handle_guest_smc':
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
      47 |         return false;
         |                ^~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: note: declared here
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from arch/arm64/kvm/hyp/nvhe/psci-relay.c:15:
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |                                          ^~~~~~~~~~~~~~~~
   In file included from arch/arm64/kvm/hyp/nvhe/psci-relay.c:17:
   arch/arm64/kvm/hyp/include/nvhe/modules.h:41:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
      41 | bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:42:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
      42 | bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: error: return type is an incomplete type
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
   arch/arm64/kvm/hyp/include/nvhe/modules.h: In function 'module_handle_guest_smc':
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
      47 |         return false;
         |                ^~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: note: declared here
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/psci-relay.c: At top level:
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:30:58: error: parameter 1 ('notif') has incomplete type
      30 | static void pkvm_psci_notify(enum pkvm_psci_notification notif, struct kvm_cpu_context *host_ctxt)
         |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:30:13: error: function declaration isn't a prototype [-Werror=strict-prototypes]
      30 | static void pkvm_psci_notify(enum pkvm_psci_notification notif, struct kvm_cpu_context *host_ctxt)
         |             ^~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/psci-relay.c: In function 'pkvm_psci_notify':
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:33:36: error: type of formal parameter 1 is incomplete
      33 |                 pkvm_psci_notifier(notif, &host_ctxt->regs);
         |                                    ^~~~~
   arch/arm64/kvm/hyp/nvhe/psci-relay.c: In function 'psci_cpu_suspend':
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:192:26: error: 'PKVM_PSCI_CPU_SUSPEND' undeclared (first use in this function); did you mean 'KVM_PSCI_FN_CPU_SUSPEND'?
     192 |         pkvm_psci_notify(PKVM_PSCI_CPU_SUSPEND, host_ctxt);
         |                          ^~~~~~~~~~~~~~~~~~~~~
         |                          KVM_PSCI_FN_CPU_SUSPEND
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:192:26: note: each undeclared identifier is reported only once for each function it appears in
   arch/arm64/kvm/hyp/nvhe/psci-relay.c: In function 'psci_system_suspend':
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:223:26: error: 'PKVM_PSCI_SYSTEM_SUSPEND' undeclared (first use in this function); did you mean 'KVM_PSCI_FN_CPU_SUSPEND'?
     223 |         pkvm_psci_notify(PKVM_PSCI_SYSTEM_SUSPEND, host_ctxt);
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~
         |                          KVM_PSCI_FN_CPU_SUSPEND
   arch/arm64/kvm/hyp/nvhe/psci-relay.c: In function '__kvm_host_psci_cpu_entry':
   arch/arm64/kvm/hyp/nvhe/psci-relay.c:254:26: error: 'PKVM_PSCI_CPU_ENTRY' undeclared (first use in this function)
     254 |         pkvm_psci_notify(PKVM_PSCI_CPU_ENTRY, host_ctxt);
         |                          ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:24:
   arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:48:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
      48 | int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages);
         |                                          ^~~~~~~~~~~~~~~~
   In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:25:
   arch/arm64/kvm/hyp/include/nvhe/modules.h:41:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
      41 | bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:42:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
      42 | bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
         |      ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: error: return type is an incomplete type
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
   arch/arm64/kvm/hyp/include/nvhe/modules.h: In function 'module_handle_guest_smc':
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
      47 |         return false;
         |                ^~~~~
   arch/arm64/kvm/hyp/include/nvhe/modules.h:44:1: note: declared here
      44 | module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
         | ^~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c: At top level:
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:463:43: warning: initialized field overwritten [-Woverride-init]
     463 |         [ESR_ELx_EC_WFx]                = handle_pvm_entry_wfx,
         |                                           ^~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:463:43: note: (near initialization for 'entry_hyp_pvm_handlers[1]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:464:43: warning: initialized field overwritten [-Woverride-init]
     464 |         [ESR_ELx_EC_HVC64]              = handle_pvm_entry_hvc64,
         |                                           ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:464:43: note: (near initialization for 'entry_hyp_pvm_handlers[22]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:465:43: warning: initialized field overwritten [-Woverride-init]
     465 |         [ESR_ELx_EC_SYS64]              = handle_pvm_entry_sys64,
         |                                           ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:465:43: note: (near initialization for 'entry_hyp_pvm_handlers[24]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:466:43: warning: initialized field overwritten [-Woverride-init]
     466 |         [ESR_ELx_EC_IABT_LOW]           = handle_pvm_entry_iabt,
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:466:43: note: (near initialization for 'entry_hyp_pvm_handlers[32]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:467:43: warning: initialized field overwritten [-Woverride-init]
     467 |         [ESR_ELx_EC_DABT_LOW]           = handle_pvm_entry_dabt,
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:467:43: note: (near initialization for 'entry_hyp_pvm_handlers[36]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:472:43: warning: initialized field overwritten [-Woverride-init]
     472 |         [ESR_ELx_EC_WFx]                = handle_pvm_exit_wfx,
         |                                           ^~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:472:43: note: (near initialization for 'exit_hyp_pvm_handlers[1]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:473:43: warning: initialized field overwritten [-Woverride-init]
     473 |         [ESR_ELx_EC_HVC64]              = handle_pvm_exit_hvc64,
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:473:43: note: (near initialization for 'exit_hyp_pvm_handlers[22]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:474:43: warning: initialized field overwritten [-Woverride-init]
     474 |         [ESR_ELx_EC_SYS64]              = handle_pvm_exit_sys64,
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:474:43: note: (near initialization for 'exit_hyp_pvm_handlers[24]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:475:43: warning: initialized field overwritten [-Woverride-init]
     475 |         [ESR_ELx_EC_IABT_LOW]           = handle_pvm_exit_iabt,
         |                                           ^~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:475:43: note: (near initialization for 'exit_hyp_pvm_handlers[32]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:476:43: warning: initialized field overwritten [-Woverride-init]
     476 |         [ESR_ELx_EC_DABT_LOW]           = handle_pvm_exit_dabt,
         |                                           ^~~~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:476:43: note: (near initialization for 'exit_hyp_pvm_handlers[36]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:485:43: warning: initialized field overwritten [-Woverride-init]
     485 |         [ESR_ELx_EC_IABT_LOW]           = handle_vm_exit_abt,
         |                                           ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:485:43: note: (near initialization for 'exit_hyp_vm_handlers[32]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:486:43: warning: initialized field overwritten [-Woverride-init]
     486 |         [ESR_ELx_EC_DABT_LOW]           = handle_vm_exit_abt,
         |                                           ^~~~~~~~~~~~~~~~~~
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:486:43: note: (near initialization for 'exit_hyp_vm_handlers[36]')
   arch/arm64/kvm/hyp/nvhe/hyp-main.c: In function 'handle_host_hcall':
   arch/arm64/kvm/hyp/nvhe/hyp-main.c:2023:39: error: passing argument 1 of 'handle_host_dynamic_hcall' from incompatible pointer type [-Wincompatible-pointer-types]
    2023 |         if (handle_host_dynamic_hcall(&host_ctxt->regs, id) == HCALL_HANDLED)
         |                                       ^~~~~~~~~~~~~~~~
         |                                       |
         |                                       struct user_pt_regs *
   arch/arm64/kvm/hyp/include/nvhe/modules.h:36:51: note: expected 'struct kvm_cpu_context *' but argument is of type 'struct user_pt_regs *'
      36 | handle_host_dynamic_hcall(struct kvm_cpu_context *host_ctxt, int id)
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~


vim +/return +47 arch/arm64/kvm/hyp/include/nvhe/modules.h

905de63a80084ee Vincent Donnefort  2023-11-09  18  
94d30106c7722f4 Quentin Perret     2022-10-06  19  #ifdef CONFIG_MODULES
07e87abe4be64a1 Vincent Donnefort  2024-09-24  20  int __pkvm_init_module(void *host_mod);
15d5bab7e86b00a Vincent Donnefort  2022-09-27  21  int __pkvm_register_hcall(unsigned long hfn_hyp_va);
35b4aef425c3e60 Vincent Donnefort  2024-03-08  22  int handle_host_dynamic_hcall(struct user_pt_regs *regs, int id);
2968360a9bc2c1f Vincent Donnefort  2022-11-18  23  void __pkvm_close_module_registration(void);
c141eb26c339351 Vincent Donnefort  2024-12-06  24  bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr);
30eefcc7af64a3a Vincent Donnefort  2025-01-14  25  bool module_handle_host_smc(struct user_pt_regs *regs);
489e4bb847d0800 Quentin Perret     2025-10-23  26  enum pkvm_smc_handler_ret
489e4bb847d0800 Quentin Perret     2025-10-23  27  module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
2864d7152511a57 Nikita Ioffe       2025-05-12  28  			pkvm_handle_t handle);
eff36ac2fe9748d Bartłomiej Grzesik 2025-06-24  29  const uuid_t *module_get_guest_trng_uuid(void);
eff36ac2fe9748d Bartłomiej Grzesik 2025-06-24  30  u64 module_get_guest_trng_rng(u64 *entropy, int nbits);
94d30106c7722f4 Quentin Perret     2022-10-06  31  #else
94d30106c7722f4 Quentin Perret     2022-10-06  32  static inline int __pkvm_init_module(void *module_init) { return -EOPNOTSUPP; }
15d5bab7e86b00a Vincent Donnefort  2022-09-27  33  static inline int
15d5bab7e86b00a Vincent Donnefort  2022-09-27  34  __pkvm_register_hcall(unsigned long hfn_hyp_va) { return -EOPNOTSUPP; }
35b4aef425c3e60 Vincent Donnefort  2024-03-08  35  static inline int
35b4aef425c3e60 Vincent Donnefort  2024-03-08  36  handle_host_dynamic_hcall(struct kvm_cpu_context *host_ctxt, int id)
15d5bab7e86b00a Vincent Donnefort  2022-09-27  37  {
15d5bab7e86b00a Vincent Donnefort  2022-09-27  38  	return HCALL_UNHANDLED;
15d5bab7e86b00a Vincent Donnefort  2022-09-27  39  }
2968360a9bc2c1f Vincent Donnefort  2022-11-18  40  static inline void __pkvm_close_module_registration(void) { }
c141eb26c339351 Vincent Donnefort  2024-12-06  41  bool module_handle_host_perm_fault(struct user_pt_regs *regs, u64 esr, u64 addr) { return false; }
30eefcc7af64a3a Vincent Donnefort  2025-01-14 @42  bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
489e4bb847d0800 Quentin Perret     2025-10-23  43  enum pkvm_smc_handler_ret
489e4bb847d0800 Quentin Perret     2025-10-23  44  module_handle_guest_smc(struct arm_smccc_1_2_regs *regs, struct arm_smccc_1_2_regs *res,
2864d7152511a57 Nikita Ioffe       2025-05-12  45  			pkvm_handle_t handle)
2864d7152511a57 Nikita Ioffe       2025-05-12  46  {
2864d7152511a57 Nikita Ioffe       2025-05-12 @47  	return false;

:::::: The code at line 47 was first introduced by commit
:::::: 2864d7152511a57f4ffcf2636d4cc7c42d544c45 ANDROID: KVM: arm64: Add smc64 trap handling for protected guests

:::::: TO: Nikita Ioffe <ioffe@google.com>
:::::: CC: Fuad Tabba <tabba@google.com>

--
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:[~2026-07-16  0:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16  0:48 [android-common:android17-6.18-2026-06 3/3] arch/arm64/kvm/hyp/include/nvhe/modules.h:47:16: error: 'return' with a value, in function returning void kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.