DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ilya Maximets <i.maximets@samsung.com>
To: dev@dpdk.org, Thanneeru Srinivasulu <dev.srinivasulu@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: Re: [dpdk-dev] Query : Does Binding with vfio-pci is supported inside qemu-kvm guest/vm instance.?
Date: Tue, 12 Mar 2019 14:09:56 +0300	[thread overview]
Message-ID: <d5fe89c3-0871-ab22-e309-55ab763d760a@samsung.com> (raw)
In-Reply-To: <38327cd0-7fa2-9172-5343-0cded8e51594@intel.com>

> On 12-Mar-19 10:20 AM, Bruce Richardson wrote:
>> On Tue, Mar 12, 2019 at 05:54:39PM +0800, Jason Wang wrote:
>>>
>>> On 2019/3/12 下午5:42, Thanneeru Srinivasulu wrote:
>>>> Thanks Bruce..
>>>>
>>>> On Tue, Mar 12, 2019 at 3:08 PM Bruce Richardson
>>>> <bruce.richardson at intel.com> wrote:
>>>>> On Tue, Mar 12, 2019 at 10:57:55AM +0530, Thanneeru Srinivasulu wrote:
>>>>>> Hi Everyone.
>>>>>>
>>>>>> I did attached pice  to Guest VM using vfio-pci with qemu command, and then
>>>>>> tried binding the pcie bdf with vfio-pci, observing binding failure with
>>>>>> vfio-pci.
>>>>>>
>>>>>> Where as when tryied with igb_uio, everything works fine.
>>>>>>
>>>>>> Does Binding with vfio-pci is supported inside VM/guest?
>>>>>>
>>>>> vfio support requires the presence of an IOMMU, and you generally don't
>>>>> have an IOMMU available in a VM.
>>>>>
>>>>> /Bruce
>>>
>>>
>>> Actually, Qemu support vIOMMU + VFIO in guest[1], all you need is to add a
>>> intel IOMMU and enabling caching mode.
>>>
>>> Thanks
>>>
>>>
>>> [1]
>>>
>>> https://www.lfasiallc.com/wp-content/uploads/2017/11/Device-Assignment-with-Nested-Guests-and-DPDK_Peter-Xu.pdf
>>>
>> Thanks for the info.
>> 
>> /Bruce
>> 
> 
> One more thing: even without vIOMMU, VFIO has no-IOMMU mode which can be 
> enabled (for a recent-enough kernel). This will make VFIO work even in 
> cases where the guest doesn't have IOMMU emulation. See? There's no 
> reason to use igb_uio, ever! :D

Agree.

You could use following commands to enable no-IOMMU mode:

  modprobe vfio-pci
  echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode

This should allow using vfio-pci driver without IOMMU emulation.
However, there will be no any security accordingly.

Best regards, Ilya Maximets.

> 
> -- 
> Thanks,
> Anatoly
> 

  parent reply	other threads:[~2019-03-12 11:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  5:27 Thanneeru Srinivasulu
2019-03-12  9:38 ` Bruce Richardson
2019-03-12  9:42   ` Thanneeru Srinivasulu
2019-03-12  9:54     ` Jason Wang
2019-03-12 10:20       ` Bruce Richardson
2019-03-12 10:57         ` Burakov, Anatoly
     [not found]           ` <CGME20190312110957eucas1p1af74c8d26bf80fd815847ed8086a1e78@eucas1p1.samsung.com>
2019-03-12 11:09             ` Ilya Maximets [this message]
2019-04-02 10:38           ` John Sucaet
2019-04-02 10:38             ` John Sucaet
2019-04-02 13:38             ` Burakov, Anatoly
2019-04-02 13:38               ` Burakov, Anatoly
2019-04-03  7:49               ` John Sucaet
2019-04-03  7:49                 ` John Sucaet
2019-04-03  7:54                 ` Maxime Coquelin
2019-04-03  7:54                   ` Maxime Coquelin
2019-04-04  8:23                   ` John Sucaet
2019-04-04  8:23                     ` John Sucaet

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=d5fe89c3-0871-ab22-e309-55ab763d760a@samsung.com \
    --to=i.maximets@samsung.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev.srinivasulu@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jasowang@redhat.com \
    --cc=konstantin.ananyev@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 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).