[arm-platforms:kvm-arm64/mmu/guest-MMIO-guard 23/23] arch/arm64/mm/ioremap.c:42:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_INFO' undeclared

kernel test robot lkp at intel.com
Thu Jul 1 05:25:42 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mmu/guest-MMIO-guard
head:   94758306c5ec640d79f2093597c83bf5faba5495
commit: 94758306c5ec640d79f2093597c83bf5faba5495 [23/23] arm64: Enroll into KVM's MMIO guard if required
config: arm64-buildonly-randconfig-r001-20210630 (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
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=94758306c5ec640d79f2093597c83bf5faba5495
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms kvm-arm64/mmu/guest-MMIO-guard
        git checkout 94758306c5ec640d79f2093597c83bf5faba5495
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/mm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   arch/arm64/mm/ioremap.c: In function 'kvm_init_ioremap_services':
   arch/arm64/mm/ioremap.c:36:23: error: storage size of 'res' isn't known
      36 |  struct arm_smccc_res res;
         |                       ^~~
>> arch/arm64/mm/ioremap.c:42:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_INFO' undeclared (first use in this function)
      42 |  if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_INFO) ||
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:42:37: note: each undeclared identifier is reported only once for each function it appears in
>> arch/arm64/mm/ioremap.c:43:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_ENROLL' undeclared (first use in this function)
      43 |      !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_ENROLL) ||
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:44:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP' undeclared (first use in this function)
      44 |      !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP) ||
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:45:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP' undeclared (first use in this function)
      45 |      !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP))
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/mm/ioremap.c:48:2: error: implicit declaration of function 'arm_smccc_1_1_invoke' [-Werror=implicit-function-declaration]
      48 |  arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_INFO_FUNC_ID,
         |  ^~~~~~~~~~~~~~~~~~~~
>> arch/arm64/mm/ioremap.c:48:23: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_INFO_FUNC_ID' undeclared (first use in this function)
      48 |  arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_INFO_FUNC_ID,
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/mm/ioremap.c:53:23: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_ENROLL_FUNC_ID' undeclared (first use in this function)
      53 |  arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_ENROLL_FUNC_ID,
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:55:16: error: 'SMCCC_RET_SUCCESS' undeclared (first use in this function)
      55 |  if (res.a0 == SMCCC_RET_SUCCESS) {
         |                ^~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:36:23: warning: unused variable 'res' [-Wunused-variable]
      36 |  struct arm_smccc_res res;
         |                       ^~~
   arch/arm64/mm/ioremap.c: In function 'ioremap_page_range_hook':
   arch/arm64/mm/ioremap.c:74:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP' undeclared (first use in this function)
      74 |  if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP))
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:78:24: error: storage size of 'res' isn't known
      78 |   struct arm_smccc_res res;
         |                        ^~~
   arch/arm64/mm/ioremap.c:80:3: error: implicit declaration of function 'arm_smccc_1_1_hvc' [-Werror=implicit-function-declaration]
      80 |   arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID,
         |   ^~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:80:21: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID' undeclared (first use in this function)
      80 |   arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_MAP_FUNC_ID,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:82:17: error: 'SMCCC_RET_SUCCESS' undeclared (first use in this function)
      82 |   if (res.a0 != SMCCC_RET_SUCCESS) {
         |                 ^~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:78:24: warning: unused variable 'res' [-Wunused-variable]
      78 |   struct arm_smccc_res res;
         |                        ^~~
   arch/arm64/mm/ioremap.c: In function 'iounmap_page_range_hook':
   arch/arm64/mm/ioremap.c:100:37: error: 'ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP' undeclared (first use in this function)
     100 |  if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP))
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:104:24: error: storage size of 'res' isn't known
     104 |   struct arm_smccc_res res;
         |                        ^~~
   arch/arm64/mm/ioremap.c:106:21: error: 'ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_UNMAP_FUNC_ID' undeclared (first use in this function)
     106 |   arm_smccc_1_1_hvc(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_UNMAP_FUNC_ID,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:108:17: error: 'SMCCC_RET_SUCCESS' undeclared (first use in this function)
     108 |   if (res.a0 != SMCCC_RET_SUCCESS) {
         |                 ^~~~~~~~~~~~~~~~~
   arch/arm64/mm/ioremap.c:104:24: warning: unused variable 'res' [-Wunused-variable]
     104 |   struct arm_smccc_res res;
         |                        ^~~
   cc1: some warnings being treated as errors


vim +/ARM_SMCCC_KVM_FUNC_MMIO_GUARD_INFO +42 arch/arm64/mm/ioremap.c

    33	
    34	void kvm_init_ioremap_services(void)
    35	{
    36		struct arm_smccc_res res;
    37	
    38		if (!ioremap_guard)
    39			return;
    40	
    41		/* We need all the functions to be implemented */
  > 42		if (!kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_INFO) ||
  > 43		    !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_ENROLL) ||
    44		    !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_MAP) ||
    45		    !kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_MMIO_GUARD_UNMAP))
    46			return;
    47	
  > 48		arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_INFO_FUNC_ID,
    49				     &res);
    50		if (res.a0 != PAGE_SIZE)
    51			return;
    52	
  > 53		arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_ENROLL_FUNC_ID,
    54				     &res);
    55		if (res.a0 == SMCCC_RET_SUCCESS) {
    56			static_branch_enable(&ioremap_guard_key);
    57			pr_info("Using KVM MMIO guard for ioremap\n");
    58		} else {
    59			pr_warn("KVM MMIO guard registration failed (%ld)\n", res.a0);
    60		}
    61	}
    62	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35216 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210701/da8ba1c2/attachment-0001.gz>


More information about the linux-arm-kernel mailing list