All of lore.kernel.org
 help / color / mirror / Atom feed
* [anolis-intel-cloud:intel-6.6-PMT-enhancement-ANBZ27534 23/23] drivers/crypto/ccp/hygon/vpsp.c:294: warning: Cannot understand  * @brief Directly convert the gpa address into hpa and forward it to PSP,
@ 2026-01-14 22:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-14 22:12 UTC (permalink / raw)
  To: aubrey.li; +Cc: oe-kbuild-all

tree:   https://gitee.com/anolis/intel-cloud-kernel.git intel-6.6-PMT-enhancement-ANBZ27534
head:   5be39e8fdc241e57f9813026ad199ad5add77ce7
commit: 28b4e19791583d1b93313942b031326239349d45 [23/23] anolis: crypto: ccp: support TKM run on CSV
config: x86_64-anolis-intel-cloud-devel-6.6 (https://download.01.org/0day-ci/archive/20260115/202601150655.LdB8a6hA-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260115/202601150655.LdB8a6hA-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/202601150655.LdB8a6hA-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/crypto/ccp/hygon/vpsp.c:91: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Copy the guest data to the host kernel buffer
>> drivers/crypto/ccp/hygon/vpsp.c:294: warning: Cannot understand  * @brief Directly convert the gpa address into hpa and forward it to PSP,
    on line 294 - I thought it was a doc line
>> drivers/crypto/ccp/hygon/vpsp.c:381: warning: Cannot understand  * @brief copy data in gpa to host memory and send it to psp for processing.
    on line 381 - I thought it was a doc line


vim +294 drivers/crypto/ccp/hygon/vpsp.c

   292	
   293	/**
 > 294	 * @brief Directly convert the gpa address into hpa and forward it to PSP,
   295	 *	  It is another form of kvm_pv_psp_copy_op, mainly used for csv VMs.
   296	 *
   297	 * @param vpsp points to kvm related data
   298	 * @param cmd psp cmd id, bit 31 indicates queue priority
   299	 * @param data_gpa guest physical address of input data
   300	 * @param psp_ret indicates Asynchronous context information
   301	 *
   302	 * Since the csv guest memory cannot be read or written directly,
   303	 * the shared asynchronous context information is shared through psp_ret and return value.
   304	 */
   305	int kvm_pv_psp_forward_op(struct kvm_vpsp *vpsp, uint32_t cmd,
   306				gpa_t data_gpa, uint32_t psp_ret)
   307	{
   308		int ret;
   309		uint64_t data_hpa;
   310		uint32_t index = 0, vid = 0;
   311		struct vpsp_ret psp_async = {0};
   312		struct vpsp_context *vpsp_ctx = NULL;
   313		struct vpsp_cmd *vcmd = (struct vpsp_cmd *)&cmd;
   314		uint8_t prio = CSV_COMMAND_PRIORITY_LOW;
   315	
   316		vpsp_get_context(&vpsp_ctx, vpsp->kvm->userspace_pid);
   317	
   318		ret = check_cmd_forward_op_permission(vpsp, vpsp_ctx, data_gpa, cmd);
   319		if (unlikely(ret)) {
   320			pr_err("directly operation not allowed\n");
   321			goto end;
   322		}
   323	
   324		ret = vpsp_try_bind_vtkm(vpsp, vpsp_ctx, cmd, (uint32_t *)&psp_async);
   325		if (unlikely(ret || *(uint32_t *)&psp_async)) {
   326			pr_err("try to bind vtkm failed (ret %x, psp_async %x)\n",
   327				ret, *(uint32_t *)&psp_async);
   328			goto end;
   329		}
   330	
   331		if (vpsp_ctx)
   332			vid = vpsp_ctx->vid;
   333	
   334		*((uint32_t *)&psp_async) = psp_ret;
   335		data_hpa = PUT_PSP_VID(gpa_to_hpa(vpsp, data_gpa), vid);
   336	
   337		switch (psp_async.status) {
   338		case VPSP_INIT:
   339			/* try to send command to the device for execution*/
   340			ret = vpsp_try_do_cmd(cmd, data_hpa, &psp_async);
   341			if (unlikely(ret)) {
   342				pr_err("[%s]: vpsp_do_cmd failed\n", __func__);
   343				goto end;
   344			}
   345			break;
   346	
   347		case VPSP_RUNNING:
   348			prio = vcmd->is_high_rb ? CSV_COMMAND_PRIORITY_HIGH :
   349				CSV_COMMAND_PRIORITY_LOW;
   350			index = psp_async.index;
   351			/* try to get the execution result from ringbuffer*/
   352			ret = vpsp_try_get_result(prio, index, data_hpa, &psp_async);
   353			if (unlikely(ret)) {
   354				pr_err("[%s]: vpsp_try_get_result failed\n", __func__);
   355				goto end;
   356			}
   357			break;
   358	
   359		default:
   360			pr_err("[%s]: invalid command status\n", __func__);
   361			break;
   362		}
   363	
   364	end:
   365		/**
   366		 * In order to indicate both system errors and PSP errors,
   367		 * the psp_async.pret field needs to be reused.
   368		 */
   369		psp_async.format = VPSP_RET_PSP_FORMAT;
   370		if (ret) {
   371			psp_async.format = VPSP_RET_SYS_FORMAT;
   372			if (ret > 0)
   373				ret = -ret;
   374			psp_async.pret = (uint16_t)ret;
   375		}
   376		return *((int *)&psp_async);
   377	}
   378	EXPORT_SYMBOL_GPL(kvm_pv_psp_forward_op);
   379	
   380	/**
 > 381	 * @brief copy data in gpa to host memory and send it to psp for processing.

-- 
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-01-14 22:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 22:12 [anolis-intel-cloud:intel-6.6-PMT-enhancement-ANBZ27534 23/23] drivers/crypto/ccp/hygon/vpsp.c:294: warning: Cannot understand * @brief Directly convert the gpa address into hpa and forward it to PSP, 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.