RE: [RFC v1 5/5] Call irqbypass update routine when updating irqfd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Wu, Feng
> Sent: Friday, July 10, 2015 12:13 PM
> To: Alex Williamson
> Cc: kvm@xxxxxxxxxxxxxxx; pbonzini@xxxxxxxxxx; joro@xxxxxxxxxx;
> avi.kivity@xxxxxxxxx; eric.auger@xxxxxxxxxx; Wu, Feng
> Subject: RE: [RFC v1 5/5] Call irqbypass update routine when updating irqfd
> 
> 
> 
> > -----Original Message-----
> > From: kvm-owner@xxxxxxxxxxxxxxx [mailto:kvm-owner@xxxxxxxxxxxxxxx] On
> > Behalf Of Alex Williamson
> > Sent: Friday, July 10, 2015 11:26 AM
> > To: Wu, Feng
> > Cc: kvm@xxxxxxxxxxxxxxx; pbonzini@xxxxxxxxxx; joro@xxxxxxxxxx;
> > avi.kivity@xxxxxxxxx; eric.auger@xxxxxxxxxx
> > 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.wu@xxxxxxxxx>
> > > ---
> > >  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 majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����o�^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux