On 09/22/2011 12:04 PM, Jan Kiszka wrote:
>           goto out;
>
>  +    if (!kvm_check_extension(kvm_state, KVM_CAP_ASSIGN_DEV_IRQ)&&
>  +        (dev->cap.available&  ASSIGNED_DEVICE_CAP_MSIX ||
>  +         dev->cap.available&  ASSIGNED_DEVICE_CAP_MSI ||
>  +         assigned_dev_pci_read_byte(pci_dev, PCI_INTERRUPT_PIN) != 0)) {
>  +        goto out;
>  +    }
>  +

That's not equivalent as it needlessly prevents IRQ support in the
absence of KVM_CAP_ASSIGN_DEV_IRQ.

Let's just fix the core issue and replace the test for
KVM_CAP_DEVICE_MSIX with a test call of KVM_ASSIGN_SET_MSIX_NR, passing
in a NULL struct. If it returns -EFAULT, the IOCTL is known and MSIX is
supported.


Or just add KVM_CAP_DEVICE_MSIX to the kernel and backport it where needed?

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to