[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108010650.DLRzJOtm-lkp@intel.com>
Date: Sun, 1 Aug 2021 06:36:02 +0800
From: kernel test robot <lkp@...el.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Alex Williamson <alex.williamson@...hat.com>,
Christoph Hellwig <hch@....de>,
Cornelia Huck <cohuck@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kirti Wankhede <kwankhede@...dia.com>
Subject: drivers/s390/crypto/vfio_ap_ops.c:204: warning: expecting prototype
for vfio_ap_setirq(). Prototype was for vfio_ap_irq_enable() instead
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c7d102232649226a69dddd58a4942cf13cff4f7c
commit: af3ab3f9b986cdbc1b97b8a3341ce78851edb0dd vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
date: 6 weeks ago
config: s390-randconfig-r024-20210801 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af3ab3f9b986cdbc1b97b8a3341ce78851edb0dd
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout af3ab3f9b986cdbc1b97b8a3341ce78851edb0dd
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/s390/crypto/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/s390/crypto/vfio_ap_ops.c:204: warning: Function parameter or member 'isc' not described in 'vfio_ap_irq_enable'
drivers/s390/crypto/vfio_ap_ops.c:204: warning: Function parameter or member 'nib' not described in 'vfio_ap_irq_enable'
>> drivers/s390/crypto/vfio_ap_ops.c:204: warning: expecting prototype for vfio_ap_setirq(). Prototype was for vfio_ap_irq_enable() instead
drivers/s390/crypto/vfio_ap_ops.c:509: warning: Excess function parameter 'matrix_dev' description in 'vfio_ap_verify_queue_reserved'
vim +204 drivers/s390/crypto/vfio_ap_ops.c
ec89b55e3bce7c8 Pierre Morel 2019-05-21 184
ec89b55e3bce7c8 Pierre Morel 2019-05-21 185 /**
ec89b55e3bce7c8 Pierre Morel 2019-05-21 186 * vfio_ap_setirq: Enable Interruption for a APQN
ec89b55e3bce7c8 Pierre Morel 2019-05-21 187 *
ec89b55e3bce7c8 Pierre Morel 2019-05-21 188 * @dev: the device associated with the ap_queue
ec89b55e3bce7c8 Pierre Morel 2019-05-21 189 * @q: the vfio_ap_queue holding AQIC parameters
ec89b55e3bce7c8 Pierre Morel 2019-05-21 190 *
ec89b55e3bce7c8 Pierre Morel 2019-05-21 191 * Pin the NIB saved in *q
ec89b55e3bce7c8 Pierre Morel 2019-05-21 192 * Register the guest ISC to GIB interface and retrieve the
ec89b55e3bce7c8 Pierre Morel 2019-05-21 193 * host ISC to issue the host side PQAP/AQIC
ec89b55e3bce7c8 Pierre Morel 2019-05-21 194 *
ec89b55e3bce7c8 Pierre Morel 2019-05-21 195 * Response.status may be set to AP_RESPONSE_INVALID_ADDRESS in case the
ec89b55e3bce7c8 Pierre Morel 2019-05-21 196 * vfio_pin_pages failed.
ec89b55e3bce7c8 Pierre Morel 2019-05-21 197 *
ec89b55e3bce7c8 Pierre Morel 2019-05-21 198 * Otherwise return the ap_queue_status returned by the ap_aqic(),
ec89b55e3bce7c8 Pierre Morel 2019-05-21 199 * all retry handling will be done by the guest.
ec89b55e3bce7c8 Pierre Morel 2019-05-21 200 */
ec89b55e3bce7c8 Pierre Morel 2019-05-21 201 static struct ap_queue_status vfio_ap_irq_enable(struct vfio_ap_queue *q,
ec89b55e3bce7c8 Pierre Morel 2019-05-21 202 int isc,
ec89b55e3bce7c8 Pierre Morel 2019-05-21 203 unsigned long nib)
ec89b55e3bce7c8 Pierre Morel 2019-05-21 @204 {
ec89b55e3bce7c8 Pierre Morel 2019-05-21 205 struct ap_qirq_ctrl aqic_gisa = {};
ec89b55e3bce7c8 Pierre Morel 2019-05-21 206 struct ap_queue_status status = {};
ec89b55e3bce7c8 Pierre Morel 2019-05-21 207 struct kvm_s390_gisa *gisa;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 208 struct kvm *kvm;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 209 unsigned long h_nib, g_pfn, h_pfn;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 210 int ret;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 211
ec89b55e3bce7c8 Pierre Morel 2019-05-21 212 g_pfn = nib >> PAGE_SHIFT;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 213 ret = vfio_pin_pages(mdev_dev(q->matrix_mdev->mdev), &g_pfn, 1,
ec89b55e3bce7c8 Pierre Morel 2019-05-21 214 IOMMU_READ | IOMMU_WRITE, &h_pfn);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 215 switch (ret) {
ec89b55e3bce7c8 Pierre Morel 2019-05-21 216 case 1:
ec89b55e3bce7c8 Pierre Morel 2019-05-21 217 break;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 218 default:
ec89b55e3bce7c8 Pierre Morel 2019-05-21 219 status.response_code = AP_RESPONSE_INVALID_ADDRESS;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 220 return status;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 221 }
ec89b55e3bce7c8 Pierre Morel 2019-05-21 222
ec89b55e3bce7c8 Pierre Morel 2019-05-21 223 kvm = q->matrix_mdev->kvm;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 224 gisa = kvm->arch.gisa_int.origin;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 225
ec89b55e3bce7c8 Pierre Morel 2019-05-21 226 h_nib = (h_pfn << PAGE_SHIFT) | (nib & ~PAGE_MASK);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 227 aqic_gisa.gisc = isc;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 228 aqic_gisa.isc = kvm_s390_gisc_register(kvm, isc);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 229 aqic_gisa.ir = 1;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 230 aqic_gisa.gisa = (uint64_t)gisa >> 4;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 231
ec89b55e3bce7c8 Pierre Morel 2019-05-21 232 status = ap_aqic(q->apqn, aqic_gisa, (void *)h_nib);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 233 switch (status.response_code) {
ec89b55e3bce7c8 Pierre Morel 2019-05-21 234 case AP_RESPONSE_NORMAL:
ec89b55e3bce7c8 Pierre Morel 2019-05-21 235 /* See if we did clear older IRQ configuration */
ec89b55e3bce7c8 Pierre Morel 2019-05-21 236 vfio_ap_free_aqic_resources(q);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 237 q->saved_pfn = g_pfn;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 238 q->saved_isc = isc;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 239 break;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 240 case AP_RESPONSE_OTHERWISE_CHANGED:
ec89b55e3bce7c8 Pierre Morel 2019-05-21 241 /* We could not modify IRQ setings: clear new configuration */
ec89b55e3bce7c8 Pierre Morel 2019-05-21 242 vfio_unpin_pages(mdev_dev(q->matrix_mdev->mdev), &g_pfn, 1);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 243 kvm_s390_gisc_unregister(kvm, isc);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 244 break;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 245 default:
ec89b55e3bce7c8 Pierre Morel 2019-05-21 246 pr_warn("%s: apqn %04x: response: %02x\n", __func__, q->apqn,
ec89b55e3bce7c8 Pierre Morel 2019-05-21 247 status.response_code);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 248 vfio_ap_irq_disable(q);
ec89b55e3bce7c8 Pierre Morel 2019-05-21 249 break;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 250 }
ec89b55e3bce7c8 Pierre Morel 2019-05-21 251
ec89b55e3bce7c8 Pierre Morel 2019-05-21 252 return status;
ec89b55e3bce7c8 Pierre Morel 2019-05-21 253 }
ec89b55e3bce7c8 Pierre Morel 2019-05-21 254
:::::: The code at line 204 was first introduced by commit
:::::: ec89b55e3bce7c8a4bc6b1203280e81342d6745c s390: ap: implement PAPQ AQIC interception in kernel
:::::: TO: Pierre Morel <pmorel@...ux.ibm.com>
:::::: CC: Vasily Gorbik <gor@...ux.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33019 bytes)
Powered by blists - more mailing lists