From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 4437837B0 for ; Tue, 12 Mar 2019 12:09:59 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190312110959euoutp01d593d3b78f3e167437a21c7fb82f34a5~LMZHfU8xi2285822858euoutp01h for ; Tue, 12 Mar 2019 11:09:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190312110959euoutp01d593d3b78f3e167437a21c7fb82f34a5~LMZHfU8xi2285822858euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1552388999; bh=2yD91CMaD2S7JUp8WDgBSY4Iwx7nR81Mr7zs4SjH/ZY=; h=To:Subject:Cc:From:Date:In-Reply-To:References:From; b=FA37QU1YuF8XR00b667InagxAazAIvcO2oJ70+4shO4+HN7TT+h74cc5cIGwYK6ep l/zyDWfbztFTvNU2Jv9vXTwe8c4PwcsqhfLpJE2IbC5/d2BBDrJVWXsV4Ssi1yF6od Ua0JW2orKBczm/2+e8ZX/GDYsVwnN6z0N6BAZHsk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190312110958eucas1p1d4e39f6e37dae3ec933c9ab1a3845496~LMZG5skT23158631586eucas1p17; Tue, 12 Mar 2019 11:09:58 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 15.84.04806.683978C5; Tue, 12 Mar 2019 11:09:58 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190312110957eucas1p1af74c8d26bf80fd815847ed8086a1e78~LMZGIDgZ93158531585eucas1p10; Tue, 12 Mar 2019 11:09:57 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190312110957eusmtrp27b3a4581b5d07821d55ba97b142fd172~LMZF5295B1660316603eusmtrp2L; Tue, 12 Mar 2019 11:09:57 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-89-5c87938699f3 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 75.2B.04128.583978C5; Tue, 12 Mar 2019 11:09:57 +0000 (GMT) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190312110956eusmtip130a575046ffde73fdb7e576029f7c864~LMZFcDEv20649806498eusmtip1V; Tue, 12 Mar 2019 11:09:56 +0000 (GMT) To: dev@dpdk.org, Thanneeru Srinivasulu Cc: Jason Wang , Konstantin Ananyev , Anatoly Burakov From: Ilya Maximets Message-ID: Date: Tue, 12 Mar 2019 14:09:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <38327cd0-7fa2-9172-5343-0cded8e51594@intel.com> Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWy7djP87ptk9tjDH5M5LZ4dG8xs8Wku6vY LN592s5kcaX9J7vFskufmSze/1nE4sDm8WvBUlaPnbPusnss3vOSyeP9vqtsHn1bVjEGsEZx 2aSk5mSWpRbp2yVwZRzZGF6wk6/i07PpjA2Ml7m7GDk5JARMJHb+f8DexcjFISSwglHi4O3t TBDOF0aJcztvQTmfGSW+XZ7BBtPy8MofRojEckaJ9pYTUM5HRonbz48wg1SJCDhLrD55lwnE FhbIldi5fhs7iM0s0MYose9dJIjNJqAjcWr1EUYQm1fATmLDozusXYwcHCwCqhK3p3qDhE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nsAoNAtJ+ywkLbOQtMxC0rKAkWUVo0hqaXFuem6x kV5xYm5xaV66XnJ+7iZGYKxtO/Zzyw7GrnfBhxgFOBiVeHhfFLTFCLEmlhVX5h5ilOBgVhLh tchpjxHiTUmsrEotyo8vKs1JLT7EaAr020RmKdHkfGAayCuJNzQ1NLewNDQ3Njc2s1AS5z1v UBklJJCeWJKanZpakFoE08fEwSnVwLhJV/Z1/1yRF8wZVy7ycUya0sGzbMp+q8Izt5/1b/rc e+LeAaWWGWtcdu0IeHpaJ63mhQbLMgHTrfOnHFuWuPhXeY6b6IyHBypq/y9mv5xRsCAs9NaV q8zCOg6TIzRrS9RYNoWWLtRpjp+draebVhjRc9V8q7dB9rOtp6wnmH14P/M3S9Nauw1KLMUZ iYZazEXFiQCLnDJUywIAAA== X-CMS-MailID: 20190312110957eucas1p1af74c8d26bf80fd815847ed8086a1e78 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190312110957eucas1p1af74c8d26bf80fd815847ed8086a1e78 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190312110957eucas1p1af74c8d26bf80fd815847ed8086a1e78 References: <38327cd0-7fa2-9172-5343-0cded8e51594@intel.com> Subject: Re: [dpdk-dev] Query : Does Binding with vfio-pci is supported inside qemu-kvm guest/vm instance.? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 11:10:00 -0000 > 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 >>>> 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 >