From: Aashima Arora <aashima.arora@aricent.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Accessing Virtual Function Device on Guest Machine using VFIO
Date: Fri, 5 Dec 2014 17:29:20 +0000 [thread overview]
Message-ID: <ba8c3baac3b4430dac0f007f6da0c564@GURMBXV02.AD.ARICENT.COM> (raw)
In-Reply-To: <128892442.7P4I1l0Tzy@xps13>
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?
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."
next prev parent reply other threads:[~2014-12-05 17:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 21:42 [dpdk-dev] [PATCH] librte_pmd_af_packet: add compile-time checks for kernel-specific options John W. Linville
2014-12-05 3:46 ` Neil Horman
2014-12-05 9:30 ` Thomas Monjalon
2014-12-05 16:24 ` John W. Linville
2014-12-05 16:37 ` Thomas Monjalon
2014-12-05 17:29 ` Aashima Arora [this message]
2014-12-05 18:08 ` [dpdk-dev] Accessing Virtual Function Device on Guest Machine using VFIO Thomas Monjalon
2014-12-05 18:42 ` Neil Horman
2014-12-05 21:14 ` [dpdk-dev] [PATCH] librte_pmd_af_packet: add compile-time checks for kernel-specific options Thomas Monjalon
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=ba8c3baac3b4430dac0f007f6da0c564@GURMBXV02.AD.ARICENT.COM \
--to=aashima.arora@aricent.com \
--cc=dev@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).