> -----Original Message-----
> From: Wu, Feng
> Sent: Friday, July 10, 2015 12:13 PM
> To: Alex Williamson
> Cc: kvm@vger.kernel.org; pbonz...@redhat.com; j...@8bytes.org;
> avi.kiv...@gmail.com; eric.au...@linaro.org; Wu, Feng
> Subject: RE: [RFC v1 5/5] Call irqbypass update routine when updating irqfd
> 
> 
> 
> > -----Original Message-----
> > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On
> > Behalf Of Alex Williamson
> > Sent: Friday, July 10, 2015 11:26 AM
> > To: Wu, Feng
> > Cc: kvm@vger.kernel.org; pbonz...@redhat.com; j...@8bytes.org;
> > avi.kiv...@gmail.com; eric.au...@linaro.org
> > Subject: Re: [RFC v1 5/5] Call irqbypass update routine when updating irqfd
> >
> > 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...@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,
> 
> Yes, you are right. All we need is the producer information which has been
> passed in the register routine. And we can easily make this update logic
> inside the consumer. Thanks for your comments!
> 
> Thanks,
> Feng

BTW, Paolo & Alex, in VFIO framework, how can we know a vCPU or a guest
has assigned devices to it?

Thanks,
Feng

> 
> >
> > Alex
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majord...@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
N�����r��y����b�X��ǧv�^�)޺{.n�+����h����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf

Reply via email to