Hi Jean-Philippe,
On Fri, Mar 22, 2019 at 01:29:24PM +0800, Leo Yan wrote:
> On Fri, Mar 22, 2019 at 01:23:08PM +0800, Leo Yan wrote:
> > If MSI doesn't support per-vector masking capability and
> > PCI_MSI_FLAGS_MASKBIT isn't set in message control field, the function
> > vfio_pci_msi_vector_write() will directly bail out for this case and
> > every vector's 'virt_state' keeps setting bit VFIO_PCI_MSI_STATE_MASKED.
> >
> > This results in the state maintained in 'virt_state' cannot really
> > reflect the MSI hardware state; finally it will mislead the function
> > vfio_pci_update_msi_entry() to skip IRQ forwarding with below flow:
> >
> > vfio_pci_update_msi_entry() {
> >
> > [...]
> >
> > if (msi_is_masked(entry->virt_state) == msi_is_masked(entry->phys_state))
> > return 0; ==> skip IRQ forwarding
> >
> > [...]
> > }
> >
> > To fix this issue, when detect PCI_MSI_FLAGS_MASKBIT is not set in the
> > message control field, this patch simply clears bit
> > VFIO_PCI_MSI_STATE_MASKED for all vectors 'virt_state'; at the end
> > vfio_pci_update_msi_entry() can forward MSI IRQ successfully.
>
> Just remind, this patch is for kvmtool but not for kernel. Sorry I
> forget to add it in subject.
Gentle ping. Not sure if this patch is reasonable, could you help to
give a review?
[...]
Thanks,
Leo Yan
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm