From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Fix assigned device with no irq
Date: Thu, 07 May 2009 15:24:15 +0300 [thread overview]
Message-ID: <4A02D2EF.2010402@redhat.com> (raw)
In-Reply-To: <1236076755-14328-1-git-send-email-sheng@linux.intel.com>
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).
>
>
Just noticed I missed this patch. Is it still needed or is it obsolete?
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 4d2be16..ce80f3a 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -217,8 +217,11 @@ static void kvm_free_assigned_irq(struct kvm *kvm,
> kvm_free_irq_source_id(kvm, assigned_dev->irq_source_id);
> assigned_dev->irq_source_id = -1;
>
> - if (!assigned_dev->irq_requested_type)
> + if (!assigned_dev->irq_requested_type) {
> + if (assigned_dev->dev->msi_enabled)
> + pci_disable_msi(assigned_dev->dev);
> return;
> + }
>
> /*
> * In kvm_free_device_irq, cancel_work_sync return true if:
> @@ -308,6 +311,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 here */
> + if (airq->host_irq == 0)
> + return 0;
> +
> if (irqchip_in_kernel(kvm)) {
> if (!msi2intx &&
> (adev->irq_requested_type & KVM_ASSIGNED_DEV_HOST_MSI)) {
> @@ -529,9 +536,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 */
>
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-05-07 12:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 7:49 [PATCH] KVM: Fix assigned device with no irq Sheng Yang
2009-03-03 9:47 ` Sheng Yang
2009-03-03 10:39 ` Sheng Yang
2009-05-07 12:24 ` Avi Kivity [this message]
2009-05-07 12:28 ` Marcelo Tosatti
2009-05-07 12:32 ` Sheng Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A02D2EF.2010402@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sheng@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.