All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type
@ 2020-11-15  5:14 kernel test robot
  2020-11-15  8:50   ` Woodhouse, David
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-11-15  5:14 UTC (permalink / raw
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4002 bytes --]

tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head:   3539292abae0518a1d5bee996174d88014865134
commit: 43814676588fa6f849e6ad0ddb4195c8b9fc6030 [40/54] kvm/eventfd: Drain events from eventfd in irqfd_wakeup()
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=43814676588fa6f849e6ad0ddb4195c8b9fc6030
        git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git
        git fetch --no-tags kvm queue
        git checkout 43814676588fa6f849e6ad0ddb4195c8b9fc6030
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'irqfd_wakeup':
>> arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
     198 |   eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
         |                       ^~~~~~~~~~~~~~~
         |                       |
         |                       struct eventfd_ctx **
   In file included from arch/x86/kvm/../../../virt/kvm/eventfd.c:21:
   include/linux/eventfd.h:44:46: note: expected 'struct eventfd_ctx *' but argument is of type 'struct eventfd_ctx **'
      44 | void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt);
         |                          ~~~~~~~~~~~~~~~~~~~~^~~
   cc1: some warnings being treated as errors

vim +/eventfd_ctx_do_read +198 arch/x86/kvm/../../../virt/kvm/eventfd.c

   180	
   181	/*
   182	 * Called with wqh->lock held and interrupts disabled
   183	 */
   184	static int
   185	irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
   186	{
   187		struct kvm_kernel_irqfd *irqfd =
   188			container_of(wait, struct kvm_kernel_irqfd, wait);
   189		__poll_t flags = key_to_poll(key);
   190		struct kvm_kernel_irq_routing_entry irq;
   191		struct kvm *kvm = irqfd->kvm;
   192		unsigned seq;
   193		int idx;
   194		int ret = 0;
   195	
   196		if (flags & EPOLLIN) {
   197			u64 cnt;
 > 198			eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
   199	
   200			idx = srcu_read_lock(&kvm->irq_srcu);
   201			do {
   202				seq = read_seqcount_begin(&irqfd->irq_entry_sc);
   203				irq = irqfd->irq_entry;
   204			} while (read_seqcount_retry(&irqfd->irq_entry_sc, seq));
   205			/* An event has been signaled, inject an interrupt */
   206			if (kvm_arch_set_irq_inatomic(&irq, kvm,
   207						      KVM_USERSPACE_IRQ_SOURCE_ID, 1,
   208						      false) == -EWOULDBLOCK)
   209				schedule_work(&irqfd->inject);
   210			srcu_read_unlock(&kvm->irq_srcu, idx);
   211			ret = 1;
   212		}
   213	
   214		if (flags & EPOLLHUP) {
   215			/* The eventfd is closing, detach from KVM */
   216			unsigned long iflags;
   217	
   218			spin_lock_irqsave(&kvm->irqfds.lock, iflags);
   219	
   220			/*
   221			 * We must check if someone deactivated the irqfd before
   222			 * we could acquire the irqfds.lock since the item is
   223			 * deactivated from the KVM side before it is unhooked from
   224			 * the wait-queue.  If it is already deactivated, we can
   225			 * simply return knowing the other side will cleanup for us.
   226			 * We cannot race against the irqfd going away since the
   227			 * other side is required to acquire wqh->lock, which we hold
   228			 */
   229			if (irqfd_is_active(irqfd))
   230				irqfd_deactivate(irqfd);
   231	
   232			spin_unlock_irqrestore(&kvm->irqfds.lock, iflags);
   233		}
   234	
   235		return ret;
   236	}
   237	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 77095 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type
  2020-11-15  5:14 [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type kernel test robot
@ 2020-11-15  8:50   ` Woodhouse, David
  0 siblings, 0 replies; 5+ messages in thread
From: Woodhouse, David @ 2020-11-15  8:50 UTC (permalink / raw
  To: lkp@intel.com
  Cc: kbuild-all@lists.01.org, farrah.chen@intel.com,
	kvm@vger.kernel.org, robert.hu@intel.com, danmei.wei@intel.com,
	pbonzini@redhat.com

On Sun, 2020-11-15 at 13:14 +0800, kernel test robot wrote:
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86/kvm/../../../virt/kvm/eventfd.c: In function
> 'irqfd_wakeup':
> >> arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing
> argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type [-
> Werror=incompatible-pointer-types]
>      198 |   eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
>          |                       ^~~~~~~~~~~~~~~
>          |                       |
>          |                       struct eventfd_ctx **

Hm, that ampersand isn't supposed to be there; it arrived when I moved
the 'drain events' part of the series after the exclusivity.

There was a new version of the patch, and I thought we'd discussed on
IRC that it wasn't worth resending in email and you'd fix it up on
applying?

Since this is still only in the queue and not yet in a permanent branch
you can still fix it up, right?

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 147adc862b95..e996989cd580 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -195,7 +195,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 
 	if (flags & EPOLLIN) {
 		u64 cnt;
-		eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
+		eventfd_ctx_do_read(irqfd->eventfd, &cnt);
 
 		idx = srcu_read_lock(&kvm->irq_srcu);
 		do {



Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type
@ 2020-11-15  8:50   ` Woodhouse, David
  0 siblings, 0 replies; 5+ messages in thread
From: Woodhouse, David @ 2020-11-15  8:50 UTC (permalink / raw
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

On Sun, 2020-11-15 at 13:14 +0800, kernel test robot wrote:
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86/kvm/../../../virt/kvm/eventfd.c: In function
> 'irqfd_wakeup':
> >> arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing
> argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type [-
> Werror=incompatible-pointer-types]
>      198 |   eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
>          |                       ^~~~~~~~~~~~~~~
>          |                       |
>          |                       struct eventfd_ctx **

Hm, that ampersand isn't supposed to be there; it arrived when I moved
the 'drain events' part of the series after the exclusivity.

There was a new version of the patch, and I thought we'd discussed on
IRC that it wasn't worth resending in email and you'd fix it up on
applying?

Since this is still only in the queue and not yet in a permanent branch
you can still fix it up, right?

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 147adc862b95..e996989cd580 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -195,7 +195,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 
 	if (flags & EPOLLIN) {
 		u64 cnt;
-		eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
+		eventfd_ctx_do_read(irqfd->eventfd, &cnt);
 
 		idx = srcu_read_lock(&kvm->irq_srcu);
 		do {



Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type
  2020-11-15  8:50   ` Woodhouse, David
@ 2020-11-15 14:29     ` Paolo Bonzini
  -1 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-11-15 14:29 UTC (permalink / raw
  To: Woodhouse, David, lkp@intel.com
  Cc: kbuild-all@lists.01.org, farrah.chen@intel.com,
	kvm@vger.kernel.org, robert.hu@intel.com, danmei.wei@intel.com

On 15/11/20 09:50, Woodhouse, David wrote:
> On Sun, 2020-11-15 at 13:14 +0800, kernel test robot wrote:
>>
>> All errors (new ones prefixed by >>):
>>
>>     arch/x86/kvm/../../../virt/kvm/eventfd.c: In function
>> 'irqfd_wakeup':
>>>> arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing
>> argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type [-
>> Werror=incompatible-pointer-types]
>>       198 |   eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
>>           |                       ^~~~~~~~~~~~~~~
>>           |                       |
>>           |                       struct eventfd_ctx **
> 
> Hm, that ampersand isn't supposed to be there; it arrived when I moved
> the 'drain events' part of the series after the exclusivity.
> 
> There was a new version of the patch, and I thought we'd discussed on
> IRC that it wasn't worth resending in email and you'd fix it up on
> applying?

Yes, I just pushed what I had quickly last week so that people could see 
what I had processed already, but I hadn't even compile-tested it 
(because it's not a permanent branch).

I had a couple more patches for 5.10-rc before I could branch kvm/next. 
I should be able to test the current queue and push to kvm/next 
tomorrow.  In the meanwhile there's no need for you to do anything.

Paolo

> 
> Since this is still only in the queue and not yet in a permanent branch
> you can still fix it up, right?
> 
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index 147adc862b95..e996989cd580 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -195,7 +195,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
>   
>   	if (flags & EPOLLIN) {
>   		u64 cnt;
> -		eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
> +		eventfd_ctx_do_read(irqfd->eventfd, &cnt);
>   
>   		idx = srcu_read_lock(&kvm->irq_srcu);
>   		do {
> 
> 
> 
> Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type
@ 2020-11-15 14:29     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2020-11-15 14:29 UTC (permalink / raw
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

On 15/11/20 09:50, Woodhouse, David wrote:
> On Sun, 2020-11-15 at 13:14 +0800, kernel test robot wrote:
>>
>> All errors (new ones prefixed by >>):
>>
>>     arch/x86/kvm/../../../virt/kvm/eventfd.c: In function
>> 'irqfd_wakeup':
>>>> arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing
>> argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type [-
>> Werror=incompatible-pointer-types]
>>       198 |   eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
>>           |                       ^~~~~~~~~~~~~~~
>>           |                       |
>>           |                       struct eventfd_ctx **
> 
> Hm, that ampersand isn't supposed to be there; it arrived when I moved
> the 'drain events' part of the series after the exclusivity.
> 
> There was a new version of the patch, and I thought we'd discussed on
> IRC that it wasn't worth resending in email and you'd fix it up on
> applying?

Yes, I just pushed what I had quickly last week so that people could see 
what I had processed already, but I hadn't even compile-tested it 
(because it's not a permanent branch).

I had a couple more patches for 5.10-rc before I could branch kvm/next. 
I should be able to test the current queue and push to kvm/next 
tomorrow.  In the meanwhile there's no need for you to do anything.

Paolo

> 
> Since this is still only in the queue and not yet in a permanent branch
> you can still fix it up, right?
> 
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index 147adc862b95..e996989cd580 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -195,7 +195,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
>   
>   	if (flags & EPOLLIN) {
>   		u64 cnt;
> -		eventfd_ctx_do_read(&irqfd->eventfd, &cnt);
> +		eventfd_ctx_do_read(irqfd->eventfd, &cnt);
>   
>   		idx = srcu_read_lock(&kvm->irq_srcu);
>   		do {
> 
> 
> 
> Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-15 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-15  5:14 [kvm:queue 40/54] arch/x86/kvm/../../../virt/kvm/eventfd.c:198:23: error: passing argument 1 of 'eventfd_ctx_do_read' from incompatible pointer type kernel test robot
2020-11-15  8:50 ` Woodhouse, David
2020-11-15  8:50   ` Woodhouse, David
2020-11-15 14:29   ` Paolo Bonzini
2020-11-15 14:29     ` Paolo Bonzini

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.