Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-28 Thread Auger Eric
Hi Paolo, On 2/28/20 11:34 AM, Paolo Bonzini wrote: > On 27/02/20 22:14, Auger Eric wrote: >>> Yes KVM kernel side should not be involed when we're using split >>> irqchip in this case. However it should still belongs to the work of >>> the userspace KVM module (kvm-all.c) so that it can still "m

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-28 Thread Paolo Bonzini
On 27/02/20 22:14, Auger Eric wrote: >> Yes KVM kernel side should not be involed when we're using split >> irqchip in this case. However it should still belongs to the work of >> the userspace KVM module (kvm-all.c) so that it can still "mimic" the >> resamplefd feature that KVM_IRQFD provides. >

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Peter Xu
On Thu, Feb 27, 2020 at 10:14:47PM +0100, Auger Eric wrote: > Hi Peter, Hi, Eric, [...] > > + * the KVM resample fd kick is skipped. The userspace > > + * needs to remember the resamplefd and kick it when we > > + * receive EOI of this IRQ. >

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Auger Eric
Hi Peter, On 2/27/20 8:19 PM, Peter Xu wrote: > On Thu, Feb 27, 2020 at 07:22:08PM +0100, Auger Eric wrote: >> Hi Peter, >> >> On 2/27/20 7:00 PM, Peter Xu wrote: >>> On Thu, Feb 27, 2020 at 06:42:09PM +0100, Auger Eric wrote: Hi Peter, On 2/27/20 6:00 PM, Peter Xu wrote: > This

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Peter Xu
On Thu, Feb 27, 2020 at 07:22:08PM +0100, Auger Eric wrote: > Hi Peter, > > On 2/27/20 7:00 PM, Peter Xu wrote: > > On Thu, Feb 27, 2020 at 06:42:09PM +0100, Auger Eric wrote: > >> Hi Peter, > >> > >> On 2/27/20 6:00 PM, Peter Xu wrote: > >>> This is majorly only for X86 because that's the only on

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Auger Eric
Hi Peter, On 2/27/20 7:00 PM, Peter Xu wrote: > On Thu, Feb 27, 2020 at 06:42:09PM +0100, Auger Eric wrote: >> Hi Peter, >> >> On 2/27/20 6:00 PM, Peter Xu wrote: >>> This is majorly only for X86 because that's the only one that supports >>> split irqchip for now. >>> >>> When the irqchip is split

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Peter Xu
On Thu, Feb 27, 2020 at 06:42:09PM +0100, Auger Eric wrote: > Hi Peter, > > On 2/27/20 6:00 PM, Peter Xu wrote: > > This is majorly only for X86 because that's the only one that supports > > split irqchip for now. > > > > When the irqchip is split, we face a dilemma that KVM irqfd will be > > ena

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Auger Eric
Hi Peter, On 2/27/20 6:00 PM, Peter Xu wrote: > This is majorly only for X86 because that's the only one that supports > split irqchip for now. > > When the irqchip is split, we face a dilemma that KVM irqfd will be > enabled, however the slow irqchip is still running in the userspace. > It means

Re: [PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Peter Xu
On Thu, Feb 27, 2020 at 12:00:48PM -0500, Peter Xu wrote: > +static inline void kvm_resample_fd_remove(int gsi) > +{ > +KVMResampleFd *rfd; > + > +QLIST_FOREACH(rfd, &kvm_resample_fd_list, node) { > +if (rfd->gsi == gsi) { > +QLIST_REMOVE(rfd, node); Oops, rfd is leaked

[PATCH v1.1 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-02-27 Thread Peter Xu
This is majorly only for X86 because that's the only one that supports split irqchip for now. When the irqchip is split, we face a dilemma that KVM irqfd will be enabled, however the slow irqchip is still running in the userspace. It means that the resamplefd in the kernel irqfds won't take any ef