* [android-common:android16-6.12 4/4] arch/arm64/kvm/pkvm.c:756:5: warning: no previous prototype for 'pkvm_enable_smc_forwarding'
@ 2025-08-15 1:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-15 1:18 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android16-6.12
head: 0b5aee52ee031640b7194c3a35ce6ba10f188e21
commit: 128144da229a1de12ebe5bca87f607aa348c6ba9 [4/4] ANDROID: KVM: arm64: Add smc64 trap handling for protected guests
config: arm64-randconfig-2001-20250814 (https://download.01.org/0day-ci/archive/20250815/202508150322.iHehrRYf-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250815/202508150322.iHehrRYf-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/202508150322.iHehrRYf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/arm64/kvm/pkvm.c:756:5: warning: no previous prototype for 'pkvm_enable_smc_forwarding' [-Wmissing-prototypes]
int pkvm_enable_smc_forwarding(struct file *kvm_file)
^~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/arm64/kvm/hyp/nvhe/mm.c:17:
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:49:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
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:19:
arch/arm64/kvm/hyp/include/nvhe/modules.h:36:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
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:37:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:38:6: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
bool 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/mem_protect.c:21:
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:49:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
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:36:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
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:37:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:38:6: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
bool 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:2357:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
int __pkvm_host_donate_sglist_hyp(struct pkvm_sglist_page *sglist, size_t nr_pages)
^~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2357:5: error: conflicting types for '__pkvm_host_donate_sglist_hyp'
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:21:
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:49:5: note: previous declaration of '__pkvm_host_donate_sglist_hyp' was here
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/alloc_tag.h:8,
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/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:2366:71: error: dereferencing pointer to incomplete type 'struct pkvm_sglist_page'
WARN_ON(__hyp_check_page_state_range((u64)sglist, nr_pages * sizeof(*sglist),
^~~~~~~
include/asm-generic/bug.h:123:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
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:2370:36: error: invalid use of undefined type 'struct pkvm_sglist_page'
u64 phys = hyp_pfn_to_phys(sglist[p].pfn);
^
arch/arm64/kvm/hyp/include/nvhe/memory.h:79:46: note: in definition of macro 'hyp_pfn_to_phys'
#define hyp_pfn_to_phys(pfn) ((phys_addr_t)((pfn) << PAGE_SHIFT))
^~~
In file included from include/linux/string.h:12,
from include/linux/bitmap.h:13,
from include/linux/cpumask.h:12,
from include/linux/alloc_tag.h:13,
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/arm64/kvm/hyp/nvhe/mem_protect.c:7:
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2373:43: error: invalid use of undefined type 'struct pkvm_sglist_page'
if (check_shl_overflow(PAGE_SIZE, sglist[p].order, &size)) {
^
include/linux/overflow.h:200:9: note: in definition of macro 'check_shl_overflow'
typeof(s) _s = s; \
^
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2373:43: error: invalid use of undefined type 'struct pkvm_sglist_page'
if (check_shl_overflow(PAGE_SIZE, sglist[p].order, &size)) {
^
include/linux/overflow.h:200:17: note: in definition of macro 'check_shl_overflow'
typeof(s) _s = s; \
^
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2395:36: error: invalid use of undefined type 'struct pkvm_sglist_page'
size_t size = PAGE_SIZE << sglist[p].order;
^
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:2396:36: error: invalid use of undefined type 'struct pkvm_sglist_page'
u64 phys = hyp_pfn_to_phys(sglist[p].pfn);
^
arch/arm64/kvm/hyp/include/nvhe/memory.h:79:46: note: in definition of macro 'hyp_pfn_to_phys'
#define hyp_pfn_to_phys(pfn) ((phys_addr_t)((pfn) << PAGE_SHIFT))
^~~
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2408:34: error: invalid use of undefined type 'struct pkvm_sglist_page'
phys = hyp_pfn_to_phys(sglist[p].pfn);
^
arch/arm64/kvm/hyp/include/nvhe/memory.h:79:46: note: in definition of macro 'hyp_pfn_to_phys'
#define hyp_pfn_to_phys(pfn) ((phys_addr_t)((pfn) << PAGE_SHIFT))
^~~
arch/arm64/kvm/hyp/nvhe/mem_protect.c:2409:31: error: invalid use of undefined type 'struct pkvm_sglist_page'
size = PAGE_SIZE << sglist[p].order;
^
--
In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:24:
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h:49:42: warning: 'struct pkvm_sglist_page' declared inside parameter list will not be visible outside of this definition or declaration
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:36:6: warning: no previous prototype for 'module_handle_host_perm_fault' [-Wmissing-prototypes]
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:37:6: warning: no previous prototype for 'module_handle_host_smc' [-Wmissing-prototypes]
bool module_handle_host_smc(struct user_pt_regs *regs) { return false; }
^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/hyp/include/nvhe/modules.h:38:6: warning: no previous prototype for 'module_handle_guest_smc' [-Wmissing-prototypes]
bool 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:77:6: warning: no previous prototype for '__pkvm_unmask_serror' [-Wmissing-prototypes]
void __pkvm_unmask_serror(void)
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:463:22: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_WFx] = handle_pvm_entry_wfx,
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:463:22: note: (near initialization for 'entry_hyp_pvm_handlers[1]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:464:24: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_HVC64] = handle_pvm_entry_hvc64,
^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:464:24: note: (near initialization for 'entry_hyp_pvm_handlers[22]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:465:24: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_SYS64] = handle_pvm_entry_sys64,
^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:465:24: note: (near initialization for 'entry_hyp_pvm_handlers[24]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:466:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_IABT_LOW] = handle_pvm_entry_iabt,
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:466:27: note: (near initialization for 'entry_hyp_pvm_handlers[32]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:467:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_DABT_LOW] = handle_pvm_entry_dabt,
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:467:27: note: (near initialization for 'entry_hyp_pvm_handlers[36]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:472:22: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_WFx] = handle_pvm_exit_wfx,
^~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:472:22: note: (near initialization for 'exit_hyp_pvm_handlers[1]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:473:24: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_HVC64] = handle_pvm_exit_hvc64,
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:473:24: note: (near initialization for 'exit_hyp_pvm_handlers[22]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:474:24: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_SYS64] = handle_pvm_exit_sys64,
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:474:24: note: (near initialization for 'exit_hyp_pvm_handlers[24]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:475:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_IABT_LOW] = handle_pvm_exit_iabt,
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:475:27: note: (near initialization for 'exit_hyp_pvm_handlers[32]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:476:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_DABT_LOW] = handle_pvm_exit_dabt,
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:476:27: note: (near initialization for 'exit_hyp_pvm_handlers[36]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:485:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_IABT_LOW] = handle_vm_exit_abt,
^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:485:27: note: (near initialization for 'exit_hyp_vm_handlers[32]')
arch/arm64/kvm/hyp/nvhe/hyp-main.c:486:27: warning: initialized field overwritten [-Woverride-init]
[ESR_ELx_EC_DABT_LOW] = handle_vm_exit_abt,
^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/hyp-main.c:486:27: 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:1982:32: error: passing argument 1 of 'handle_host_dynamic_hcall' from incompatible pointer type [-Werror=incompatible-pointer-types]
if (handle_host_dynamic_hcall(&host_ctxt->regs, id) == HCALL_HANDLED)
^~~~~~~~~~~~~~~~
In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:25:
arch/arm64/kvm/hyp/include/nvhe/modules.h:31:51: note: expected 'struct kvm_cpu_context *' but argument is of type 'struct user_pt_regs *'
handle_host_dynamic_hcall(struct kvm_cpu_context *host_ctxt, int id)
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
cc1: some warnings being treated as errors
vim +/pkvm_enable_smc_forwarding +756 arch/arm64/kvm/pkvm.c
755
> 756 int pkvm_enable_smc_forwarding(struct file *kvm_file)
757 {
758 struct kvm *host_kvm;
759
760 if (!file_is_kvm(kvm_file))
761 return -EINVAL;
762
763 if (!kvm_get_kvm_safe(kvm_file->private_data))
764 return -EINVAL;
765
766 host_kvm = kvm_file->private_data;
767 if (!host_kvm)
768 return -EINVAL;
769
770 host_kvm->arch.pkvm.smc_forwarded = true;
771
772 return 0;
773 }
774
--
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:[~2025-08-15 1:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 1:18 [android-common:android16-6.12 4/4] arch/arm64/kvm/pkvm.c:756:5: warning: no previous prototype for 'pkvm_enable_smc_forwarding' 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.