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

From: Zhenzhong Duan
Date: Tue Oct 20 2020 - 06:05:32 EST


On Tue, Oct 20, 2020 at 2:23 PM Jason Wang <jasowang@xxxxxxxxxx> 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
> > isn't registered as IRQ bypass producer.
>
>
> Is there any side effect if it was still registered?

Not much side effect in theory, just some legacy mode IRQs in producer
list and it's not easy to distinguish them with PI interrupt mode IRQ.
The main purpose of this patch is to provide a way for people to know
if a device IRQ is really offloaded from kernel by a print.
>
>
> >
> > With this change, below message is printed:
> > "vfio-pci 0000:db:00.0: irq bypass producer (token 0000000060c8cda5) registration fails: -22"
>
>
> I may miss something, but the patch only touches vhost-vDPA instead of VFIO?

VFIO already has above print in vfio_msi_set_vector_signal() but vhost-vDPA not.

Regards
Zhenzhong