From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) by dpdk.org (Postfix) with ESMTP id 503C36A8B for ; Wed, 10 Dec 2014 07:47:24 +0100 (CET) Received: by mail-qc0-f172.google.com with SMTP id m20so1746521qcx.3 for ; Tue, 09 Dec 2014 22:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qnmHuU0cVUpq3upvClBtPH/y3upZ9dceGaHYlOzGMMw=; b=0gSRB4NL9peNs8x4LrSLVuR7KC7dyZvjrxJIcaEcV48q6REkN6kH3d1ADbY3Hv6J9n inAsX6uZCYF1Ur+gAHV4xiaLZlB315cDJb9/e/rd5U35WYsExAghY4GlZmYZE04f+duW LhzN4CDM+NVwMFZaAV052GV+vj2Xatd28v5VnKoWchi3qV2sMzND3NdRfltxpvFTePmi H41cT8jr7+yLUZlfTwXHyU51O32E2PXOCJ20g7BfloXqBdDKDlzr+KB99PCsyWTb3C4f SUewMYeqQv3nlCn4TTEqRqKxxNremliUygVZKNvDQY/dqFKj50yQiQIfn2el+8OKAIF8 BS4w== MIME-Version: 1.0 X-Received: by 10.140.109.102 with SMTP id k93mr4815314qgf.83.1418194043730; Tue, 09 Dec 2014 22:47:23 -0800 (PST) Received: by 10.229.170.14 with HTTP; Tue, 9 Dec 2014 22:47:23 -0800 (PST) In-Reply-To: References: Date: Wed, 10 Dec 2014 12:17:23 +0530 Message-ID: From: Aashima Arora To: Kiran KN Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Accessing a Virtual Function Driver in Guest Machine via VFIO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2014 06:47:24 -0000 Thanks for your reply. Sorry, that was a typo, It was meant to be this only. 00:04.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01) On Wed, Dec 10, 2014 at 7:45 AM, Kiran KN wrote: > Looks like virtual functions are not created. > For 82599, use ixgbe driver as modprobe ixgbe max_vfs=1,1 > > Lspci should say "virtual". Something like this - > 03:10.1 Ethernet controller: Intel Corporation 82599 Ethernet Controller > Virtual Function (rev 01) > > Thanks, > Kiran > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Aashima Arora > Sent: Friday, December 05, 2014 11:00 AM > To: dev@dpdk.org > Subject: [dpdk-dev] Accessing a Virtual Function Driver in Guest Machine > via VFIO > > Hi, > I was trying to access the pci config space(BAR) of the virtual function > device visible in the virtual machine, similar to what DPDK does on host > via both UIO and VFIO. Did the following steps. > > 1. Bound PF Drivers to ixgbe and spawned virtual function drivers , bound > them to vfio-pci and set their mac addresses via ip link. Ran Qemu and > assigned the VF Device using vfio-pci device assignment and initialized the > virtual machine. > insmod igb max_vfs=2 > > ./x86_64-softmmu/qemu-system-x86_64 -cpu host -boot c -hda > /home/vm-images/vm2.imgsnapshot -m 2048M -smp 2 --enable-kvm -name 'vm2' > -vnc :2 -pidfile /tmp/vm2.pid -driile=fat:rw:/tmp/share,snapshot=off > -device vfio-pci,host=01:10.1,id=net1 > > > 2. The VF Device was visible with another pci address. > > 00:04.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ > Network Connection (rev 01) > > Further ran DPDK testpmd on top of VM but bound the virtual function > driver to igb_uio instead of vfio-pci. It ran successfully. The ixgbevf > pmd driver is able to access the BAR registers in pci_uio_map_resource via > mmaping somewhere close to hugepages. I was not able to bind the virtual > function driver in VM to vfio-pci and hence DPDK would not be able to run > with VFIO enabled as it complains of no IOMMU support. I also believe that > there is little logic in binding the vf device to vfio-pci again since qemu > has already taken care of it and hardware support is involved. > > So my questions are > a. vfio is meant to be a replacement for both uio and device assignment > for qemu. This doesnt seem simultaneous. Comment? > b. Is there any way to access VF device using VFIO in guest userspace? > Have you run DPDK in guest machine with VFIO support enabled and all > dependent modules inserted and did it work? > c. Is igb_uio or uio_pci_generic in future the only way to access the > device in guest userspace? > > *Regards* > -- *Regards,* *Aashima Arora* *+91 9899019317* *arora.aa91@gmail.com *