[PATCH v2 3/7] virt: geniezone: Introduce GenieZone hypervisor support

kernel test robot lkp at intel.com
Fri Apr 28 13:07:12 PDT 2023


Hi Yi-De,

kernel test robot noticed the following build warnings:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on robh/for-next arnd-asm-generic/master linus/master v6.3 next-20230428]
[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/Yi-De-Wu/docs-geniezone-Introduce-GenieZone-hypervisor/20230428-183738
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link:    https://lore.kernel.org/r/20230428103622.18291-4-yi-de.wu%40mediatek.com
patch subject: [PATCH v2 3/7] virt: geniezone: Introduce GenieZone hypervisor support
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230429/202304290334.fCw7PKYU-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/0e3f05a6e4547eb309032d047115a47d8f59641d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yi-De-Wu/docs-geniezone-Introduce-GenieZone-hypervisor/20230428-183738
        git checkout 0e3f05a6e4547eb309032d047115a47d8f59641d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/geniezone/ drivers/virt/geniezone/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304290334.fCw7PKYU-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/arm64/geniezone/gzvm_arch.c:112:5: warning: no previous prototype for 'gzvm_vm_arch_enable_cap' [-Wmissing-prototypes]
     112 | int gzvm_vm_arch_enable_cap(struct gzvm *gzvm, struct gzvm_enable_cap *cap,
         |     ^~~~~~~~~~~~~~~~~~~~~~~
--
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a0' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a1' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a2' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a3' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a4' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a5' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a6' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'a7' not described in 'gzvm_hypcall_wrapper'
   arch/arm64/geniezone/gzvm_arch.c:24: warning: Function parameter or member 'res' not described in 'gzvm_hypcall_wrapper'
>> arch/arm64/geniezone/gzvm_arch.c:24: warning: expecting prototype for geniezone_hypercall_wrapper(). Prototype was for gzvm_hypcall_wrapper() instead
   arch/arm64/geniezone/gzvm_arch.c:133: warning: Function parameter or member 'gzvm' not described in 'gzvm_vm_ioctl_get_pvmfw_size'
   arch/arm64/geniezone/gzvm_arch.c:133: warning: Function parameter or member 'cap' not described in 'gzvm_vm_ioctl_get_pvmfw_size'
   arch/arm64/geniezone/gzvm_arch.c:133: warning: Function parameter or member 'argp' not described in 'gzvm_vm_ioctl_get_pvmfw_size'
   arch/arm64/geniezone/gzvm_arch.c:155: warning: Function parameter or member 'gzvm' not described in 'gzvm_vm_ioctl_cap_pvm'
   arch/arm64/geniezone/gzvm_arch.c:155: warning: Function parameter or member 'cap' not described in 'gzvm_vm_ioctl_cap_pvm'
   arch/arm64/geniezone/gzvm_arch.c:155: warning: Function parameter or member 'argp' not described in 'gzvm_vm_ioctl_cap_pvm'


vim +/gzvm_vm_arch_enable_cap +112 arch/arm64/geniezone/gzvm_arch.c

    13	
    14	/**
    15	 * geniezone_hypercall_wrapper()
    16	 *
    17	 * Return: The wrapper helps caller to convert geniezone errno to Linux errno.
    18	 */
    19	static int gzvm_hypcall_wrapper(unsigned long a0, unsigned long a1,
    20					unsigned long a2, unsigned long a3,
    21					unsigned long a4, unsigned long a5,
    22					unsigned long a6, unsigned long a7,
    23					struct arm_smccc_res *res)
  > 24	{
    25		arm_smccc_hvc(a0, a1, a2, a3, a4, a5, a6, a7, res);
    26		return gz_err_to_errno(res->a0);
    27	}
    28	
    29	int gzvm_arch_probe(void)
    30	{
    31		struct arm_smccc_res res;
    32	
    33		arm_smccc_hvc(MT_HVC_GZVM_PROBE, 0, 0, 0, 0, 0, 0, 0, &res);
    34		if (res.a0 == 0)
    35			return 0;
    36	
    37		return -ENXIO;
    38	}
    39	
    40	int gzvm_arch_set_memregion(gzvm_id_t vm_id, size_t buf_size,
    41				    phys_addr_t region)
    42	{
    43		struct arm_smccc_res res;
    44	
    45		return gzvm_hypcall_wrapper(MT_HVC_GZVM_SET_MEMREGION, vm_id,
    46					    buf_size, region, 0, 0, 0, 0, &res);
    47	}
    48	
    49	static int gzvm_cap_arm_vm_ipa_size(void __user *argp)
    50	{
    51		__u64 value = CONFIG_ARM64_PA_BITS;
    52	
    53		if (copy_to_user(argp, &value, sizeof(__u64)))
    54			return -EFAULT;
    55	
    56		return 0;
    57	}
    58	
    59	int gzvm_arch_check_extension(struct gzvm *gzvm, __u64 cap, void __user *argp)
    60	{
    61		int ret = -EOPNOTSUPP;
    62	
    63		switch (cap) {
    64		case GZVM_CAP_ARM_PROTECTED_VM: {
    65			__u64 success = 1;
    66	
    67			if (copy_to_user(argp, &success, sizeof(__u64)))
    68				return -EFAULT;
    69			ret = 0;
    70			break;
    71		}
    72		case GZVM_CAP_ARM_VM_IPA_SIZE: {
    73			ret = gzvm_cap_arm_vm_ipa_size(argp);
    74			break;
    75		}
    76		default:
    77			ret = -EOPNOTSUPP;
    78		}
    79	
    80		return ret;
    81	}
    82	
    83	/**
    84	 * gzvm_arch_create_vm()
    85	 *
    86	 * Return:
    87	 * * positive value	- VM ID
    88	 * * -ENOMEM		- Memory not enough for storing VM data
    89	 */
    90	int gzvm_arch_create_vm(void)
    91	{
    92		struct arm_smccc_res res;
    93		int ret;
    94	
    95		ret = gzvm_hypcall_wrapper(MT_HVC_GZVM_CREATE_VM, 0, 0, 0, 0, 0, 0, 0,
    96					   &res);
    97	
    98		if (ret == 0)
    99			return res.a1;
   100		else
   101			return ret;
   102	}
   103	
   104	int gzvm_arch_destroy_vm(gzvm_id_t vm_id)
   105	{
   106		struct arm_smccc_res res;
   107	
   108		return gzvm_hypcall_wrapper(MT_HVC_GZVM_DESTROY_VM, vm_id, 0, 0, 0, 0,
   109					    0, 0, &res);
   110	}
   111	
 > 112	int gzvm_vm_arch_enable_cap(struct gzvm *gzvm, struct gzvm_enable_cap *cap,
   113				    struct arm_smccc_res *res)
   114	{
   115		return gzvm_hypcall_wrapper(MT_HVC_GZVM_ENABLE_CAP, gzvm->vm_id,
   116					   cap->cap, cap->args[0], cap->args[1],
   117					   cap->args[2], cap->args[3], cap->args[4],
   118					   res);
   119	}
   120	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



More information about the Linux-mediatek mailing list