All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Feng Wu <feng.wu@intel.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, joro@8bytes.org,
	avi.kivity@gmail.com, eric.auger@linaro.org
Subject: Re: [RFC v1 5/5] Call irqbypass update routine when updating irqfd
Date: Thu, 09 Jul 2015 21:26:18 -0600	[thread overview]
Message-ID: <1436498778.1391.246.camel@redhat.com> (raw)
In-Reply-To: <1436497207-4786-6-git-send-email-feng.wu@intel.com>

On Fri, 2015-07-10 at 11:00 +0800, Feng Wu wrote:
> Call update routine when updating irqfd, this can update the
> IRTE for Intel posted-interrupts.
> 
> Signed-off-by: Feng Wu <feng.wu@intel.com>
> ---
>  virt/kvm/eventfd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index a32cf6c..1226835 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -570,8 +570,10 @@ void kvm_irq_routing_update(struct kvm *kvm)
>  
>  	spin_lock_irq(&kvm->irqfds.lock);
>  
> -	list_for_each_entry(irqfd, &kvm->irqfds.items, list)
> +	list_for_each_entry(irqfd, &kvm->irqfds.items, list) {
>  		irqfd_update(kvm, irqfd);
> +		irqfd->consumer.update(&irqfd->consumer);
> +	}
>  
>  	spin_unlock_irq(&kvm->irqfds.lock);
>  }

I don't understand why the irq bypass manager needs to know about this
update callback.  We could just as easily make it be a function pointer
on the irqfd structure or maybe just open code it.  It's defined by the
consumer and called by the consumer, the irq bypass manager shouldn't
know about it.  Thanks,

Alex


  reply	other threads:[~2015-07-10  3:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10  3:00 [RFC v1 0/5] irq bypass interface implementation for VT-d Posted-interrupts Feng Wu
2015-07-10  3:00 ` [RFC v1 1/5] vfio: Register/unregister irq_bypass_producer Feng Wu
2015-07-10  3:00 ` [RFC v1 2/5] KVM: x86: Update IRTE for posted-interrupts Feng Wu
2015-07-10  3:00 ` [RFC v1 3/5] KVM: Add pointer to 'struct irq_bypass_produce' in 'kvm_kernel_irqfd' Feng Wu
2015-07-10  3:00 ` [RFC v1 4/5] KVM: x86: Add arch specific routines for irqbypass manager Feng Wu
2015-07-10  3:27   ` Alex Williamson
2015-07-10  3:00 ` [RFC v1 5/5] Call irqbypass update routine when updating irqfd Feng Wu
2015-07-10  3:26   ` Alex Williamson [this message]
2015-07-10  4:12     ` Wu, Feng
2015-07-10  8:28       ` Wu, Feng
2015-07-10 12:47         ` Paolo Bonzini
2015-07-10 14:11           ` Alex Williamson

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=1436498778.1391.246.camel@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=avi.kivity@gmail.com \
    --cc=eric.auger@linaro.org \
    --cc=feng.wu@intel.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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 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.