From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by dpdk.org (Postfix) with ESMTP id 49496C34C for ; Wed, 11 May 2016 09:35:59 +0200 (CEST) Received: by mail-vk0-f46.google.com with SMTP id s184so46490624vkb.3 for ; Wed, 11 May 2016 00:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=kJhPJe1Ws63ihNY58F8fGlnPJXeVAcFofpcYDWwsK3A=; b=VlaBSg+Q0NyRNMcrStTOPuDGw26UZGXnCVb2sp/M0OmzenaOlaTsa8919CiT9ggaxf j3haIvJSIeGiqHDUZNS1nR9uY0FF5QkWeX3nLPAI9aarkHQigiGHGnDnrQeuHkM8ZnW8 xm1nlCBSRVz27cZ+ACi8yLTjxXJl2FRBwsCyBeQ9qIOuw4TAVHg64Mf+I6Cp8qVgGeFn XrXvCVS7ygfbRjcSgvbCh62msPOmZW/5iz+euxP7z1VHyGliwNZmfk4k/jthl1R3h/Ub C19rzFUCd6HmcqzDCfRd/TVSOD5VVXK0/3jmg2g7VeX3XfTe7RUg5n5y5PSdDKQC8Xkl 2p7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=kJhPJe1Ws63ihNY58F8fGlnPJXeVAcFofpcYDWwsK3A=; b=UkWVfrD3YiuKFrD1eoy9DpArKfg1kRNC4Jk58u5oqFZCQgD2Rd1sKJLn/BONtMpdbE WeG6NZBe+oXpWcn4/JjWyvpdDcYP0r9FwGLtxVWDI8XLjeQORT3KPxPlhXFdOIEr8A4v 22UGt3hdgd0U+PZP8ad//oaFuTMvAcJXVvbk9mCojmHFv9nuGp48p47TCaB3E+i2EU9B FSo1a+9jq6ZKWE3MR60B+Rda7CIyB6qTO2nBq1aGUeDwNdSL6EDEuNetcnEKdFtjN39B Xtr9K9+5NpuwDMXvaFW2aq9XOCwhA9YAo0HeWuCxpydGdpNPrHD/jxYgCcQ0BzDKJsMF uS+g== X-Gm-Message-State: AOPr4FXB4LBQj3fT8MpSM1F05bFcqe/CwxLG2VMITFmb1GvRHECxnG9eID4W098PApjmhyZqdb34NoPWBdsyEjWL MIME-Version: 1.0 X-Received: by 10.31.217.7 with SMTP id q7mr940507vkg.134.1462952158676; Wed, 11 May 2016 00:35:58 -0700 (PDT) Received: by 10.103.112.129 with HTTP; Wed, 11 May 2016 00:35:58 -0700 (PDT) In-Reply-To: <20160510085915.529b4af5@xeon-e3> References: <1462879301-13570-1-git-send-email-zhe.tao@intel.com> <20160510085915.529b4af5@xeon-e3> Date: Wed, 11 May 2016 08:35:58 +0100 Message-ID: From: Alejandro Lucero To: Stephen Hemminger Cc: Zhe Tao , dev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v1] igu_uio: fix IOMMU domain issue 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, 11 May 2016 07:35:59 -0000 On Tue, May 10, 2016 at 4:59 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Tue, 10 May 2016 19:21:41 +0800 > Zhe Tao wrote: > > > Problem: > > The following operations will cause the igb_uio based DPDK > > operation failed. > > --Any device assignment through the kvm_assign_device interface, > > this can be the pci-assign method in QEMU > > --VFIO group attachment operation(attach to the container) > > this can happens in vfio-pci assignment in QEMU > > > If you have an IOMMU why not use VFIO instead, it is better. > It is not about VFIO against UIO but about how iommu domains are created and destroyed by the (old) kernel when iommu=pt. So even with VFIO you can have problems. We have had problems like this and other due to our device (NFP) just mapping up to 40 bits of address space. Old kernels used in LTS distributions like Ubuntu are iommu buggy and you need to do things like this mapping inside the driver for solving problems. By the way, using SRIOV just adds more problems. It is not safe to use iommu=pt with 3.13.x Ubuntu kernels. It would be a good thing for the original patch to identify those kernels where the problem was detected. Of course, there could be more kernels with the same problem but that is more work to do.