Re: [PATCH] KVM: Fix assigned device with no irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 03 March 2009 15:49:19 Sheng Yang wrote:
> Some device like VF of SRIOV only support MSI-X.
>
> With this patch, SRIOV can be enabled with KVM assigned device(all kernel
> space patches are ready).
>
Withdraw this as well.

-- 
regards
Yang, Sheng

> Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
> ---
>  virt/kvm/kvm_main.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 4d2be16..5dc6423 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -308,6 +308,10 @@ static int assigned_device_update_intx(struct kvm
> *kvm, if (adev->irq_requested_type & KVM_ASSIGNED_DEV_HOST_INTX)
>  		return 0;
>
> +	/* IRQ 0 means uninitialized */
> +	if (adev->host_irq == 0)
> +		return 0;
> +
>  	if (irqchip_in_kernel(kvm)) {
>  		if (!msi2intx &&
>  		    (adev->irq_requested_type & KVM_ASSIGNED_DEV_HOST_MSI)) {
> @@ -529,9 +533,8 @@ static int kvm_vm_ioctl_assign_irq(struct kvm *kvm,
>  			r = 0;
>  		} else {
>  			printk(KERN_WARNING
> -			       "kvm: failed to enable MSI device!\n");
> -			r = -ENOTTY;
> -			goto out_release;
> +			       "kvm: device didn't support INTx or MSI!\n");
> +			r = 0;
>  		}
>  	} else {
>  		/* Non-sharing INTx mode */


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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux