[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E959C4978C3B6342920538CF579893F0025D7564@SHSMSX104.ccr.corp.intel.com>
Date: Mon, 29 Jun 2015 09:14:54 +0000
From: "Wu, Feng" <feng.wu@...el.com>
To: Joerg Roedel <joro@...tes.org>
CC: Alex Williamson <alex.williamson@...hat.com>,
Eric Auger <eric.auger@...aro.org>,
Avi Kivity <avi.kivity@...il.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"mtosatti@...hat.com" <mtosatti@...hat.com>,
"Wu, Feng" <feng.wu@...el.com>
Subject: RE: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding
> -----Original Message-----
> From: Joerg Roedel [mailto:joro@...tes.org]
> Sent: Monday, June 29, 2015 5:06 PM
> To: Wu, Feng
> Cc: Alex Williamson; Eric Auger; Avi Kivity; kvm@...r.kernel.org;
> linux-kernel@...r.kernel.org; pbonzini@...hat.com; mtosatti@...hat.com
> Subject: Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding
>
> Hi Feng,
>
> On Thu, Jun 25, 2015 at 09:11:52AM -0600, Alex Williamson wrote:
> > So the trouble is that QEMU vfio updates a single MSI vector, but that
> > just updates a single entry within a whole table of routes, then the
> > whole table is pushed to KVM. But in kvm_set_irq_routing() we have
> > access to both the new and the old tables, so we do have the ability to
> > detect the change. We can therefore detect which GSI changed and
> > cross-reference that to KVMs irqfds. If we have an irqfd that matches
> > the GSI then we have all the information we need, right? We can use the
> > eventfd_ctx of the irqfd to call into the IRQ bypass manager if we need
> > to. If it's an irqfd that's already enabled for bypass then we may
> > already have the data we need to tweak the PI config.
> >
> > Yes, I agree it's more difficult, but it doesn't appear to be
> > impossible, right?
>
> Since this also doesn't happen very often, you could also just update _all_
> PI data-structures from kvm_set_irq_routing, no? This would just
> resemble the way the API works anyway.
Thanks a lot for your suggestion, Joerg!
Do you mean updating the hardware IRTEs for all the entries in the irq
routing table, no matter whether it is the updated one?
Thanks,
Feng
>
> You just need to be careful to update the data structures only when the
> function can't fail anymore, so that you don't have to roll back
> anything.
>
>
> Joerg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists