Re: [PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-20 Thread Zhenzhong Duan
On Tue, Oct 20, 2020 at 2:32 PM Jason Wang wrote: > > > On 2020/10/19 下午5:06, Zhenzhong Duan wrote: > > In case failure to setup Post interrupt for an IRQ, it make no sense > > to assign irqfd->producer to the producer. > > > > This change makes code more r

Re: [PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-20 Thread Zhenzhong Duan
On Tue, Oct 20, 2020 at 2:23 PM Jason Wang wrote: > > > On 2020/10/19 下午5:06, Zhenzhong Duan wrote: > > If Post interrupt is disabled due to hardware limit or forcely disabled > > by "intremap=nopost" parameter, return -EINVAL so that the legacy mode IRQ >

[PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-19 Thread Zhenzhong Duan
pass producer (token 60c8cda5) registration fails: -22" ..which also hints us if a vfio or vdpa device works in PI mode or legacy remapping mode. Add a print to vdpa code just like what vfio_msi_set_vector_signal() does. Signed-off-by: Zhenzhong Duan --- arch/x86/kvm/svm/avic.c | 3 +-- ar

[PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-19 Thread Zhenzhong Duan
In case failure to setup Post interrupt for an IRQ, it make no sense to assign irqfd->producer to the producer. This change makes code more robust. Signed-off-by: Zhenzhong Duan --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.