From: kernel test robot <lkp@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Alexander Duyck" <alexander.h.duyck@linux.intel.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linux Memory Management List" <linux-mm@kvack.org>,
"David Hildenbrand" <david@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev
Subject: Re: [PATCH v2 1/2] virtio_balloon: add work around for out of spec QEMU
Date: Thu, 11 Jul 2024 21:23:52 +0800 [thread overview]
Message-ID: <202407112126.plGUWi8I-lkp@intel.com> (raw)
In-Reply-To: <19d916257b76148f89de7386389eeb7267b1b61c.1720611677.git.mst@redhat.com>
Hi Michael,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20240710]
[cannot apply to uml/next remoteproc/rproc-next s390/features linus/master uml/fixes v6.10-rc7 v6.10-rc6 v6.10-rc5 v6.10-rc7]
[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/Michael-S-Tsirkin/virtio_balloon-add-work-around-for-out-of-spec-QEMU/20240711-004346
base: next-20240710
patch link: https://lore.kernel.org/r/19d916257b76148f89de7386389eeb7267b1b61c.1720611677.git.mst%40redhat.com
patch subject: [PATCH v2 1/2] virtio_balloon: add work around for out of spec QEMU
config: i386-randconfig-005-20240711 (https://download.01.org/0day-ci/archive/20240711/202407112126.plGUWi8I-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240711/202407112126.plGUWi8I-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/202407112126.plGUWi8I-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/virtio/virtio_balloon.c:603:55: error: too few arguments to function call, expected 5, have 4
602 | err = virtio_find_vqs(vb->vdev,
| ~~~~~~~~~~~~~~~
603 | VIRTIO_BALLOON_VQ_REPORTING, vqs_info, NULL);
| ^
include/linux/virtio_config.h:225:5: note: 'virtio_find_vqs' declared here
225 | int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
226 | struct virtqueue *vqs[],
| ~~~~~~~~~~~~~~~~~~~~~~~~
227 | struct virtqueue_info vqs_info[],
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
228 | struct irq_affinity *desc)
| ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
vim +603 drivers/virtio/virtio_balloon.c
560
561 static int init_vqs(struct virtio_balloon *vb)
562 {
563 struct virtqueue_info vqs_info[VIRTIO_BALLOON_VQ_MAX] = {};
564 struct virtqueue *vqs[VIRTIO_BALLOON_VQ_MAX];
565 int err;
566
567 /*
568 * Inflateq and deflateq are used unconditionally. The names[]
569 * will be NULL if the related feature is not enabled, which will
570 * cause no allocation for the corresponding virtqueue in find_vqs.
571 */
572 vqs_info[VIRTIO_BALLOON_VQ_INFLATE].callback = balloon_ack;
573 vqs_info[VIRTIO_BALLOON_VQ_INFLATE].name = "inflate";
574 vqs_info[VIRTIO_BALLOON_VQ_DEFLATE].callback = balloon_ack;
575 vqs_info[VIRTIO_BALLOON_VQ_DEFLATE].name = "deflate";
576
577 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
578 vqs_info[VIRTIO_BALLOON_VQ_STATS].name = "stats";
579 vqs_info[VIRTIO_BALLOON_VQ_STATS].callback = stats_request;
580 }
581
582 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
583 vqs_info[VIRTIO_BALLOON_VQ_FREE_PAGE].name = "free_page_vq";
584
585 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_REPORTING)) {
586 vqs_info[VIRTIO_BALLOON_VQ_REPORTING].name = "reporting_vq";
587 vqs_info[VIRTIO_BALLOON_VQ_REPORTING].callback = balloon_ack;
588 }
589
590 err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
591 vqs_info, NULL);
592 if (err) {
593 /*
594 * Try to work around QEMU bug which since 2020 confused vq numbers
595 * when VIRTIO_BALLOON_F_REPORTING but not
596 * VIRTIO_BALLOON_F_FREE_PAGE_HINT are offered.
597 */
598 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_REPORTING) &&
599 !virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) {
600 vqs_info[VIRTIO_BALLOON_VQ_FREE_PAGE].name = "reporting_vq";
601 vqs_info[VIRTIO_BALLOON_VQ_FREE_PAGE].callback = balloon_ack;
602 err = virtio_find_vqs(vb->vdev,
> 603 VIRTIO_BALLOON_VQ_REPORTING, vqs_info, NULL);
604 }
605
606 if (err)
607 return err;
608 }
609
610 vb->inflate_vq = vqs[VIRTIO_BALLOON_VQ_INFLATE];
611 vb->deflate_vq = vqs[VIRTIO_BALLOON_VQ_DEFLATE];
612 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
613 struct scatterlist sg;
614 unsigned int num_stats;
615 vb->stats_vq = vqs[VIRTIO_BALLOON_VQ_STATS];
616
617 /*
618 * Prime this virtqueue with one buffer so the hypervisor can
619 * use it to signal us later (it can't be broken yet!).
620 */
621 num_stats = update_balloon_stats(vb);
622
623 sg_init_one(&sg, vb->stats, sizeof(vb->stats[0]) * num_stats);
624 err = virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb,
625 GFP_KERNEL);
626 if (err) {
627 dev_warn(&vb->vdev->dev, "%s: add stat_vq failed\n",
628 __func__);
629 return err;
630 }
631 virtqueue_kick(vb->stats_vq);
632 }
633
634 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT))
635 vb->free_page_vq = vqs[VIRTIO_BALLOON_VQ_FREE_PAGE];
636
637 if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_REPORTING))
638 vb->reporting_vq = vqs[VIRTIO_BALLOON_VQ_REPORTING];
639
640 return 0;
641 }
642
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-07-11 13:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <19d916257b76148f89de7386389eeb7267b1b61c.1720611677.git.mst@redhat.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202407112126.plGUWi8I-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@linux.intel.com \
--cc=david@redhat.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=mst@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox