Re: [PATCH V3 10/10] vfio/pci: Clear VFIO_IRQ_INFO_NORESIZE for MSI-X

From: Reinette Chatre
Date: Wed Apr 19 2023 - 14:16:50 EST


Hi Alex,

On 4/18/2023 3:38 PM, Alex Williamson wrote:
> On Tue, 18 Apr 2023 10:29:21 -0700
> Reinette Chatre <reinette.chatre@xxxxxxxxx> wrote:
>

...

>> diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
>> index a3635a8e54c8..4050ad3388c2 100644
>> --- a/drivers/vfio/pci/vfio_pci_core.c
>> +++ b/drivers/vfio/pci/vfio_pci_core.c
>> @@ -1114,7 +1114,9 @@ static int vfio_pci_ioctl_get_irq_info(struct vfio_pci_core_device *vdev,
>> if (info.index == VFIO_PCI_INTX_IRQ_INDEX)
>> info.flags |=
>> (VFIO_IRQ_INFO_MASKABLE | VFIO_IRQ_INFO_AUTOMASKED);
>> - else
>> + else if ((info.index != VFIO_PCI_MSIX_IRQ_INDEX) ||
>> + (info.index == VFIO_PCI_MSIX_IRQ_INDEX &&
>> + !vdev->has_dyn_msix))
>
> Isn't this the same as:
>
> (info.index != VFIO_PCI_MSIX_IRQ_INDEX || !vdev->has_dyn_msix)
>

Yes, it is. Will fix. Thank you very much.

Reinette