Re: [PATCH v3 2/8] KVM: add PCI MSI hypercall for VFIO passthrough
From: kernel test robot
Date: Fri Oct 30 2026 - 23:43:12 EST
Hi Jose,
kernel test robot noticed the following build errors:
[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus linus/master next-20261030]
[cannot apply to kvm/queue kvm/next ath/ath-next kvm/linux-next v7.3]
[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/Jose-Ignacio-Tornos-Martinez/vfio-add-helper-to-find-PCI-device-by-vendor-device-ID/20261029-173706
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20261029163713.1366077-3-jtornosm%40redhat.com
patch subject: [PATCH v3 2/8] KVM: add PCI MSI hypercall for VFIO passthrough
config: s390-randconfig-1000-20261031 (https://download.01.org/0day-ci/archive/20261031/202610311038.ydvb3F1w-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261031/202610311038.ydvb3F1w-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610311038.ydvb3F1w-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
arch/s390/kvm/arm64/../../../../virt/kvm/vfio.c: In function 'kvm_vfio_pci_msi_alloc':
>> arch/s390/kvm/arm64/../../../../virt/kvm/vfio.c:438:48: error: 'struct irq_data' has no member named 'parent_data'
438 | for (pos = irqd; pos; pos = pos->parent_data) {
| ^~
--
arch/s390/kvm/s390/../../../../virt/kvm/vfio.c: In function 'kvm_vfio_pci_msi_alloc':
>> arch/s390/kvm/s390/../../../../virt/kvm/vfio.c:438:48: error: 'struct irq_data' has no member named 'parent_data'
438 | for (pos = irqd; pos; pos = pos->parent_data) {
| ^~
vim +438 arch/s390/kvm/arm64/../../../../virt/kvm/vfio.c
361
362 /**
363 * kvm_vfio_pci_msi_alloc - Get physical MSI address/data for a VFIO device
364 * @kvm: the VM instance
365 * @devid: PCI vendor:device packed as (vendor << 16 | device)
366 * @vector: MSI vector index
367 * @msg: output MSI message (address + data)
368 *
369 * Walks VFIO files attached to this VM, uses vfio_file_find_pci_device()
370 * to find the PCI device matching the given vendor:device ID, and returns
371 * the host's physical MSI address/data for the requested vector.
372 *
373 * Returns 0 on success, negative errno on failure.
374 */
375 int kvm_vfio_pci_msi_alloc(struct kvm *kvm, u32 devid,
376 unsigned int vector, struct msi_msg *msg)
377 {
378 struct kvm_vfio_file *kvf;
379 struct kvm_vfio *kv = NULL;
380 struct vfio_device *vdev;
381 struct kvm_device *dev;
382 struct msi_desc *desc;
383 struct irq_data *irqd;
384 struct pci_dev *pdev;
385 u16 vendor = devid >> 16;
386 u16 device = devid & 0xffff;
387 int irq;
388
389 scoped_guard(mutex, &kvm->lock) {
390 list_for_each_entry(dev, &kvm->devices, vm_node) {
391 if (dev->ops == &kvm_vfio_ops) {
392 kv = dev->private;
393 break;
394 }
395 }
396 }
397
398 if (!kv)
399 return -ENODEV;
400
401 guard(mutex)(&kv->lock);
402
403 vdev = NULL;
404 list_for_each_entry(kvf, &kv->file_list, node) {
405 vdev = vfio_file_find_pci_device(kvf->file, vendor, device);
406 if (vdev)
407 break;
408 }
409
410 if (!vdev)
411 return -ENODEV;
412
413 pdev = to_pci_dev(vdev->dev);
414
415 if (!pdev->msi_enabled && !pdev->msix_enabled) {
416 memset(msg, 0, sizeof(*msg));
417 return 0;
418 }
419
420 irq = pci_irq_vector(pdev, vector);
421 if (irq <= 0) {
422 memset(msg, 0, sizeof(*msg));
423 return 0;
424 }
425
426 irqd = irq_get_irq_data(irq);
427 if (!irqd) {
428 memset(msg, 0, sizeof(*msg));
429 return 0;
430 }
431
432 desc = irq_get_msi_desc(irq);
433 if (desc) {
434 *msg = desc->msg;
435 } else {
436 struct irq_data *pos;
437
> 438 for (pos = irqd; pos; pos = pos->parent_data) {
439 if (pos->chip && pos->chip->irq_compose_msi_msg) {
440 pos->chip->irq_compose_msi_msg(pos, msg);
441 break;
442 }
443 }
444 if (!pos) {
445 memset(msg, 0, sizeof(*msg));
446 return 0;
447 }
448 }
449
450 return 0;
451 }
452
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki