From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: [Qemu-devel] [PATCH 1/2] KVM userspace: Add PCI device passthrough support Date: Thu, 08 Nov 2007 12:00:11 +0200 Message-ID: <4732DE2B.6060600@qumranet.com> References: <11944647133010-git-send-email-amit.shah@qumranet.com> <4732D495.50000@bellard.org> Reply-To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0015071812==" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org To: Fabrice Bellard Return-path: In-Reply-To: <4732D495.50000-+Yn2HnRVxb5AfugRpC6u6w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --===============0015071812== Content-Type: multipart/alternative; boundary="------------070806030704070700040109" This is a multi-part message in MIME format. --------------070806030704070700040109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fabrice Bellard wrote: > > Hi, > > Some remarks: > > - rename the option to -pcidevice. > > - Remove the directory passthrough and put the file directly in hw/. > Rename the file to something more explicit such as pci_passthrough* > > - Suppress the files passthrough.h and neo_pci_tree.h > > - pt_init should be called only if there are really devices. Moreover > the code should be disabled for non Linux hosts. > > Can this support work if KVM is not used for CPU emulation ? Can it work > for non x86 targets ? > This patchset can work without kvm (although not tested). It can do so using a kernel module that forwards irqs to userspace. I'm not sure it will make it into Linux kernel since it allows userspace irq handling. We actually try to convert the current patch to our in-kernel apic version that won't forward irqs to userspace and hence won't work without kvm. If you're interested in pass through to qemu/kqemu (seems like a cool feature) we can try to support both. Dor. > > Regards, > > Fabrice. > > Amit Shah wrote: > > This patch introduces support for device passthrough > > from the host to a paravirtualized guest. > > > > A new command-line option, -passthrough is added. > > For example, to invoke it for an Ethernet device sitting at > > PCI bus:dev.fn 04:08.0 with host IRQ 18, use this: > > > > -passthrough Ethernet/04:08.0-18 > > > > The host driver is to be removed before doing the passthrough. > > > --------------070806030704070700040109 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Fabrice Bellard wrote:
Re: [kvm-devel] [Qemu-devel] [PATCH 1/2] KVM userspace: Add PCI device passthrough support

Hi,

Some remarks:

- rename the option to -pcidevice.

- Remove the directory passthrough and put the file directly in hw/.
Rename the file to something more explicit such as pci_passthrough*

- Suppress the files passthrough.h and neo_pci_tree.h

- pt_init should be called only if there are really devices. Moreover
the code should be disabled for non Linux hosts.

Can this support work if KVM is not used for CPU emulation ? Can it work
for non x86 targets ?

This patchset can work without kvm (although not tested). It can do so using a kernel module
that forwards irqs to userspace. I'm not sure it will make it into Linux kernel since it allows userspace
irq handling. We actually try to convert the current patch to our in-kernel apic version that won't forward
irqs to userspace and hence won't work without kvm. If you're interested in pass through to qemu/kqemu
(seems like a cool feature) we can try to support both.
Dor.

Regards,

Fabrice.

Amit Shah wrote:
> This patch introduces support for device passthrough
> from the host to a paravirtualized guest.
>
> A new command-line option, -passthrough is added.
> For example, to invoke it for an Ethernet device sitting at
> PCI bus:dev.fn 04:08.0 with host IRQ 18, use this:
>
> -passthrough Ethernet/04:08.0-18
>
> The host driver is to be removed before doing the passthrough.
>


--------------070806030704070700040109-- --===============0015071812== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============0015071812== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0015071812==--