Commit 6c8017c6 authored by Reinette Chatre's avatar Reinette Chatre Committed by Alex Williamson
Browse files

vfio/pci: Clear VFIO_IRQ_INFO_NORESIZE for MSI-X

parent e4163438
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1114,7 +1114,7 @@ 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 || !vdev->has_dyn_msix)
		info.flags |= VFIO_IRQ_INFO_NORESIZE;

	return copy_to_user(arg, &info, minsz) ? -EFAULT : 0;
+3 −0
Original line number Diff line number Diff line
@@ -511,6 +511,9 @@ struct vfio_region_info_cap_nvlink2_lnkspd {
 * then add and unmask vectors, it's up to userspace to make the decision
 * whether to allocate the maximum supported number of vectors or tear
 * down setup and incrementally increase the vectors as each is enabled.
 * Absence of the NORESIZE flag indicates that vectors can be enabled
 * and disabled dynamically without impacting other vectors within the
 * index.
 */
struct vfio_irq_info {
	__u32	argsz;