* [opencloudos:next 6625/6628] drivers/crypto/ccp/hygon/psp-dev.c:472:5: warning: no previous prototype for '__vpsp_do_cmd_locked'
@ 2024-05-17 12:38 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-17 12:38 UTC (permalink / raw)
To: jasperwang, kaixuxia, frankjpliu, kasong, sagazchen, kernelxing,
aurelianliu, jason.zeng, wu.zheng, yingbao.jia, pei.p.jia
Cc: oe-kbuild-all
tree: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git next
head: 95dac159be359bc7ba42421426462f1a96f50ee9
commit: de722d17081287993748f63e8f34d06596eec824 [6625/6628] support tkm key isolation
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240517/202405172006.ebTeyrfr-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240517/202405172006.ebTeyrfr-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/202405172006.ebTeyrfr-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/crypto/ccp/hygon/psp-dev.c:49:10: warning: no previous prototype for 'atomic64_exchange' [-Wmissing-prototypes]
49 | uint64_t atomic64_exchange(volatile uint64_t *dst, uint64_t val)
| ^~~~~~~~~~~~~~~~~
drivers/crypto/ccp/hygon/psp-dev.c:63:5: warning: no previous prototype for 'psp_mutex_init' [-Wmissing-prototypes]
63 | int psp_mutex_init(struct psp_mutex *mutex)
| ^~~~~~~~~~~~~~
>> drivers/crypto/ccp/hygon/psp-dev.c:472:5: warning: no previous prototype for '__vpsp_do_cmd_locked' [-Wmissing-prototypes]
472 | int __vpsp_do_cmd_locked(uint32_t vid, int cmd, void *data, int *psp_ret)
| ^~~~~~~~~~~~~~~~~~~~
--
>> drivers/crypto/ccp/hygon/psp-dev.c:188: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* When the virtual machine executes the 'tkm' command,
drivers/crypto/ccp/hygon/psp-dev.c:213: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Upon qemu startup, this section checks whether
drivers/crypto/ccp/hygon/psp-dev.c:241: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Upon the virtual machine is shut down,
vim +/__vpsp_do_cmd_locked +472 drivers/crypto/ccp/hygon/psp-dev.c
471
> 472 int __vpsp_do_cmd_locked(uint32_t vid, int cmd, void *data, int *psp_ret)
473 {
474 struct psp_device *psp = psp_master;
475 struct sev_device *sev;
476 phys_addr_t phys_addr;
477 unsigned int phys_lsb, phys_msb;
478 unsigned int reg, ret = 0;
479
480 if (!psp || !psp->sev_data)
481 return -ENODEV;
482
483 if (*hygon_psp_hooks.psp_dead)
484 return -EBUSY;
485
486 sev = psp->sev_data;
487
488 if (data && WARN_ON_ONCE(!virt_addr_valid(data)))
489 return -EINVAL;
490
491 /* Get the physical address of the command buffer */
492 phys_addr = PUT_PSP_VID(__psp_pa(data), vid);
493 phys_lsb = data ? lower_32_bits(phys_addr) : 0;
494 phys_msb = data ? upper_32_bits(phys_addr) : 0;
495
496 dev_dbg(sev->dev, "sev command id %#x buffer 0x%08x%08x timeout %us\n",
497 cmd, phys_msb, phys_lsb, *hygon_psp_hooks.psp_timeout);
498
499 print_hex_dump_debug("(in): ", DUMP_PREFIX_OFFSET, 16, 2, data,
500 hygon_psp_hooks.sev_cmd_buffer_len(cmd), false);
501
502 iowrite32(phys_lsb, sev->io_regs + sev->vdata->cmdbuff_addr_lo_reg);
503 iowrite32(phys_msb, sev->io_regs + sev->vdata->cmdbuff_addr_hi_reg);
504
505 sev->int_rcvd = 0;
506
507 reg = FIELD_PREP(SEV_CMDRESP_CMD, cmd) | SEV_CMDRESP_IOC;
508 iowrite32(reg, sev->io_regs + sev->vdata->cmdresp_reg);
509
510 /* wait for command completion */
511 ret = hygon_psp_hooks.sev_wait_cmd_ioc(sev, ®, *hygon_psp_hooks.psp_timeout);
512 if (ret) {
513 if (psp_ret)
514 *psp_ret = 0;
515
516 dev_err(sev->dev, "sev command %#x timed out, disabling PSP\n", cmd);
517 *hygon_psp_hooks.psp_dead = true;
518
519 return ret;
520 }
521
522 *hygon_psp_hooks.psp_timeout = *hygon_psp_hooks.psp_cmd_timeout;
523
524 if (psp_ret)
525 *psp_ret = FIELD_GET(PSP_CMDRESP_STS, reg);
526
527 if (FIELD_GET(PSP_CMDRESP_STS, reg)) {
528 dev_dbg(sev->dev, "sev command %#x failed (%#010lx)\n",
529 cmd, FIELD_GET(PSP_CMDRESP_STS, reg));
530 ret = -EIO;
531 }
532
533 print_hex_dump_debug("(out): ", DUMP_PREFIX_OFFSET, 16, 2, data,
534 hygon_psp_hooks.sev_cmd_buffer_len(cmd), false);
535
536 return ret;
537 }
538
--
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:[~2024-05-17 12:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 12:38 [opencloudos:next 6625/6628] drivers/crypto/ccp/hygon/psp-dev.c:472:5: warning: no previous prototype for '__vpsp_do_cmd_locked' 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.