mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yi-De Wu <yi-de.wu@mediatek.com>,
	Yingshiuan Pan <yingshiuan.pan@mediatek.com>,
	Ze-Yu Wang <ze-yu.wang@mediatek.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev, Arnd Bergmann <arnd@arndb.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	David Bradil <dbrazdil@google.com>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	Jade Shih <jades.shih@mediatek.com>,
	Ivan Tseng <ivan.tseng@mediatek.com>,
	My Chuang <my.chuang@mediatek.com>,
	Shawn Hsiao <shawn.hsiao@mediatek.com>,
	PeiLun Suei <peilun.suei@mediatek.com>,
	Liju Chen <liju-clr.chen@mediatek.com>,
	Willix Yeh <chi-shen.yeh@mediatek.com>,
	Kevenny Hsieh <kevenny.hsieh@mediatek.com>
Subject: Re: [PATCH v7 09/16] virt: geniezone: Add irqfd support
Date: Sat, 18 Nov 2023 21:43:05 +0800	[thread overview]
Message-ID: <202311182112.B1KM0yj9-lkp@intel.com> (raw)
In-Reply-To: <20231116152756.4250-10-yi-de.wu@mediatek.com>

Hi Yi-De,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.7-rc1 next-20231117]
[cannot apply to arm64/for-next/core robh/for-next]
[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/Yi-De-Wu/docs-geniezone-Introduce-GenieZone-hypervisor/20231116-233442
base:   linus/master
patch link:    https://lore.kernel.org/r/20231116152756.4250-10-yi-de.wu%40mediatek.com
patch subject: [PATCH v7 09/16] virt: geniezone: Add irqfd support
config: arm64-randconfig-r081-20231118 (https://download.01.org/0day-ci/archive/20231118/202311182112.B1KM0yj9-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231118/202311182112.B1KM0yj9-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/202311182112.B1KM0yj9-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   arch/arm64/geniezone/../../../drivers/virt/geniezone/gzvm_irqfd.c: In function 'gzvm_irqfd_assign':
>> arch/arm64/geniezone/../../../drivers/virt/geniezone/gzvm_irqfd.c:185:19: error: implicit declaration of function 'eventfd_ctx_fileget'; did you mean 'eventfd_ctx_fdget'? [-Werror=implicit-function-declaration]
     185 |         eventfd = eventfd_ctx_fileget(f.file);
         |                   ^~~~~~~~~~~~~~~~~~~
         |                   eventfd_ctx_fdget
>> arch/arm64/geniezone/../../../drivers/virt/geniezone/gzvm_irqfd.c:185:17: warning: assignment to 'struct eventfd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     185 |         eventfd = eventfd_ctx_fileget(f.file);
         |                 ^
   cc1: some warnings being treated as errors


vim +185 arch/arm64/geniezone/../../../drivers/virt/geniezone/gzvm_irqfd.c

   160	
   161	static int gzvm_irqfd_assign(struct gzvm *gzvm, struct gzvm_irqfd *args)
   162	{
   163		struct gzvm_kernel_irqfd *irqfd, *tmp;
   164		struct fd f;
   165		struct eventfd_ctx *eventfd = NULL;
   166		int ret;
   167		int idx;
   168	
   169		irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL_ACCOUNT);
   170		if (!irqfd)
   171			return -ENOMEM;
   172	
   173		irqfd->gzvm = gzvm;
   174		irqfd->gsi = args->gsi;
   175	
   176		INIT_LIST_HEAD(&irqfd->list);
   177		INIT_WORK(&irqfd->shutdown, irqfd_shutdown);
   178	
   179		f = fdget(args->fd);
   180		if (!f.file) {
   181			ret = -EBADF;
   182			goto out;
   183		}
   184	
 > 185		eventfd = eventfd_ctx_fileget(f.file);
   186		if (IS_ERR(eventfd)) {
   187			ret = PTR_ERR(eventfd);
   188			goto fail;
   189		}
   190	
   191		irqfd->eventfd = eventfd;
   192	
   193		/*
   194		 * Install our own custom wake-up handling so we are notified via
   195		 * a callback whenever someone signals the underlying eventfd
   196		 */
   197		init_waitqueue_func_entry(&irqfd->wait, irqfd_wakeup);
   198		init_poll_funcptr(&irqfd->pt, irqfd_ptable_queue_proc);
   199	
   200		spin_lock_irq(&gzvm->irqfds.lock);
   201	
   202		ret = 0;
   203		list_for_each_entry(tmp, &gzvm->irqfds.items, list) {
   204			if (irqfd->eventfd != tmp->eventfd)
   205				continue;
   206			/* This fd is used for another irq already. */
   207			pr_err("already used: gsi=%d fd=%d\n", args->gsi, args->fd);
   208			ret = -EBUSY;
   209			spin_unlock_irq(&gzvm->irqfds.lock);
   210			goto fail;
   211		}
   212	
   213		idx = srcu_read_lock(&gzvm->irq_srcu);
   214	
   215		list_add_tail(&irqfd->list, &gzvm->irqfds.items);
   216	
   217		spin_unlock_irq(&gzvm->irqfds.lock);
   218	
   219		vfs_poll(f.file, &irqfd->pt);
   220	
   221		srcu_read_unlock(&gzvm->irq_srcu, idx);
   222	
   223		/*
   224		 * do not drop the file until the irqfd is fully initialized, otherwise
   225		 * we might race against the EPOLLHUP
   226		 */
   227		fdput(f);
   228		return 0;
   229	
   230	fail:
   231		if (eventfd && !IS_ERR(eventfd))
   232			eventfd_ctx_put(eventfd);
   233	
   234		fdput(f);
   235	
   236	out:
   237		kfree(irqfd);
   238		return ret;
   239	}
   240	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-11-18 13:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 15:27 [PATCH v7 00/16] GenieZone hypervisor drivers Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 01/16] docs: geniezone: Introduce GenieZone hypervisor Yi-De Wu
2023-11-20 10:58   ` Bagas Sanjaya
2023-11-16 15:27 ` [PATCH v7 02/16] dt-bindings: hypervisor: Add MediaTek " Yi-De Wu
2023-11-19 15:16   ` Rob Herring
2023-11-16 15:27 ` [PATCH v7 03/16] virt: geniezone: Add GenieZone hypervisor driver Yi-De Wu
2023-11-16 16:32   ` Marc Zyngier
2023-11-16 22:35   ` kernel test robot
2023-11-16 15:27 ` [PATCH v7 04/16] virt: geniezone: Add vm support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 05/16] virt: geniezone: Add set_user_memory_region for vm Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 06/16] virt: geniezone: Add vm capability check Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 07/16] virt: geniezone: Add vcpu support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 08/16] virt: geniezone: Add irqchip support for virtual interrupt injection Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 09/16] virt: geniezone: Add irqfd support Yi-De Wu
2023-11-18 13:43   ` kernel test robot [this message]
2023-11-16 15:27 ` [PATCH v7 10/16] virt: geniezone: Add ioeventfd support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 11/16] virt: geniezone: Add memory region support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 12/16] virt: geniezone: Add dtb config support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 13/16] virt: geniezone: Add demand paging support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 14/16] virt: geniezone: Add block-based " Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 15/16] virt: geniezone: Add memory pin/unpin support Yi-De Wu
2023-11-16 15:27 ` [PATCH v7 16/16] virt: geniezone: Add memory relinquish support Yi-De Wu

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=202311182112.B1KM0yj9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=chi-shen.yeh@mediatek.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dbrazdil@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ivan.tseng@mediatek.com \
    --cc=jades.shih@mediatek.com \
    --cc=kevenny.hsieh@mediatek.com \
    --cc=krzk@kernel.org \
    --cc=liju-clr.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=my.chuang@mediatek.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peilun.suei@mediatek.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.hsiao@mediatek.com \
    --cc=will@kernel.org \
    --cc=yi-de.wu@mediatek.com \
    --cc=yingshiuan.pan@mediatek.com \
    --cc=ze-yu.wang@mediatek.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

all inboxes | Powered by JetHome®