From mboxrd@z Thu Jan 1 00:00:00 1970 From: rukhsana ansari Subject: Re: [PATCH] vhost: force vhost off for non-MSI guests Date: Mon, 14 Mar 2011 22:35:08 +0530 Message-ID: References: <20110120153521.GA24357@redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636d33ac857a9ea049e7450de Cc: Jes.Sorensen@redhat.com, Alex Williamson , jasowang@redhat.com, Juan Quintela To: "Michael S. Tsirkin" , qemu-devel@nongnu.org, kvm@vger.kernel.org Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org --001636d33ac857a9ea049e7450de Content-Type: text/plain; charset=ISO-8859-1 Seeking clarification to the original question I posted: >> >> > This maybe a novice question - Would appreciate it if you can you provide a > pointer to documentation or relevant code that explains what is the > *limitation in supporting level irq support in kvm irqfd.* > > > After browsing the KVM kernel code, it does look like direct assignment of PCI devices allows support for level-triggered interrupts to be injected to the guest from the kernel. (*as opposed to not supporting it for vhost irqfd mechanism*) This occurs when the guest device supports INTX. Reference: kvm_assigned_dev_interrupt_work_handler() in assigned-dev.c calls kvm_set_irq() with the guest_irq. This function in turn invokes the assigned set function (either kvm_set_pic_irq or kvm_set_ioapic_irq) which was setup at kvm_irq_chip creation time when kvm_setup_default_irq_routing () called for handling ioctl KVM_CREATE_IRQCHIP. So, it isn't clear why level-triggered interrupt isn't supported for irqfd mechanism. Would greatly appreciate clarification here Thanks -Rukhsana --001636d33ac857a9ea049e7450de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Seeking clarification to the original question I posted:
>>
>= ;>
> This maybe a novice question - Would appreciate it if you can= you provide a
> pointer to documentation or relevant code that expla= ins what is the
> limitation in supporting level irq support in kvm irqfd.
>= ;
>
>
After browsing the KVM kernel code, it does look like= direct assignment of PCI devices allows support for level-triggered interr= upts to be injected to the guest from the kernel.=A0 (as opposed to not = supporting it for vhost irqfd mechanism)
This occurs when the guest device supports INTX.
Reference: =A0kvm_assi= gned_dev_interrupt_work_handler() in assigned-dev.c calls kvm_set_irq()
= with the guest_irq.
This function in turn invokes the assigned set func= tion =A0(either kvm_set_pic_irq or kvm_set_ioapic_irq) which was setup at k= vm_irq_chip creation time when kvm_setup_default_irq_routing () called for = handling ioctl KVM_CREATE_IRQCHIP.

So, it isn't clear why level-triggered interrupt isn't supporte= d for irqfd mechanism.
Would greatly appreciate clarification here
Thanks
-Rukhsana

--001636d33ac857a9ea049e7450de-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58646 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzBCg-0007RG-7E for qemu-devel@nongnu.org; Mon, 14 Mar 2011 13:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzBCf-0005fs-8o for qemu-devel@nongnu.org; Mon, 14 Mar 2011 13:05:10 -0400 Received: from mail-vx0-f173.google.com ([209.85.220.173]:47530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzBCf-0005fh-6U for qemu-devel@nongnu.org; Mon, 14 Mar 2011 13:05:09 -0400 Received: by vxb41 with SMTP id 41so5007771vxb.4 for ; Mon, 14 Mar 2011 10:05:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20110120153521.GA24357@redhat.com> Date: Mon, 14 Mar 2011 22:35:08 +0530 Message-ID: Subject: Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests From: rukhsana ansari Content-Type: multipart/alternative; boundary=001636d33ac857a9ea049e7450de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org, kvm@vger.kernel.org Cc: Jes.Sorensen@redhat.com, Alex Williamson , jasowang@redhat.com, Juan Quintela --001636d33ac857a9ea049e7450de Content-Type: text/plain; charset=ISO-8859-1 Seeking clarification to the original question I posted: >> >> > This maybe a novice question - Would appreciate it if you can you provide a > pointer to documentation or relevant code that explains what is the > *limitation in supporting level irq support in kvm irqfd.* > > > After browsing the KVM kernel code, it does look like direct assignment of PCI devices allows support for level-triggered interrupts to be injected to the guest from the kernel. (*as opposed to not supporting it for vhost irqfd mechanism*) This occurs when the guest device supports INTX. Reference: kvm_assigned_dev_interrupt_work_handler() in assigned-dev.c calls kvm_set_irq() with the guest_irq. This function in turn invokes the assigned set function (either kvm_set_pic_irq or kvm_set_ioapic_irq) which was setup at kvm_irq_chip creation time when kvm_setup_default_irq_routing () called for handling ioctl KVM_CREATE_IRQCHIP. So, it isn't clear why level-triggered interrupt isn't supported for irqfd mechanism. Would greatly appreciate clarification here Thanks -Rukhsana --001636d33ac857a9ea049e7450de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Seeking clarification to the original question I posted:
>>
>= ;>
> This maybe a novice question - Would appreciate it if you can= you provide a
> pointer to documentation or relevant code that expla= ins what is the
> limitation in supporting level irq support in kvm irqfd.
>= ;
>
>
After browsing the KVM kernel code, it does look like= direct assignment of PCI devices allows support for level-triggered interr= upts to be injected to the guest from the kernel.=A0 (as opposed to not = supporting it for vhost irqfd mechanism)
This occurs when the guest device supports INTX.
Reference: =A0kvm_assi= gned_dev_interrupt_work_handler() in assigned-dev.c calls kvm_set_irq()
= with the guest_irq.
This function in turn invokes the assigned set func= tion =A0(either kvm_set_pic_irq or kvm_set_ioapic_irq) which was setup at k= vm_irq_chip creation time when kvm_setup_default_irq_routing () called for = handling ioctl KVM_CREATE_IRQCHIP.

So, it isn't clear why level-triggered interrupt isn't supporte= d for irqfd mechanism.
Would greatly appreciate clarification here
Thanks
-Rukhsana

--001636d33ac857a9ea049e7450de--