From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by dpdk.org (Postfix) with ESMTP id 3DE095F38 for ; Tue, 2 Oct 2018 18:33:18 +0200 (CEST) Received: by mail-ed1-f50.google.com with SMTP id t11-v6so2638902edq.11 for ; Tue, 02 Oct 2018 09:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=z7h+KBJGjQlPmv/DoQYv0ujjR579WRRKDEMpNgAr9GQ=; b=AEQIbCHD2R6DmeZ7OBAaxtcbHbBKSxLHDOetcmq5PgQmpzP4Rr5Kt391j0E7PfhaaW dGcLZBLLpNBwfVRJ3QB7AXbsqUv7wJaqhgkSld2a5Wn8Iv2Z9rPudzA00kGxgSCIiMCp 1aB2P4LniXwvfwEsDFl1MzIczgtWRM8pKXS/0dNoR+UXiy1wdN8JZtMhMgaEcuOQ4YGA st15ORT3y3SgQns4wXtrN9QQ3qqvMbyWIKqM1isWCFOOZfrB6G4VOV3WPmjKMKXK8YT6 lBQYoIBHriANtY1MK61gpLAgaPdUbL1xy+eYm1jaQTJE2wzDH/iuPsWzJ1NSwH9QrfYE L6Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=z7h+KBJGjQlPmv/DoQYv0ujjR579WRRKDEMpNgAr9GQ=; b=CUzlbeQEgSUXO/dSHL3IbyNwLmQh7WWcGh5TVSNimtG+IPAJKPhljc6DR/2O9zNwVg AkJkTidjgSCHUc/4+rc/4HtKu8GQ6YZPJQZSNGVCokiq47rEJCsGPhRqBILxND6ywLp/ yTVzjScfzyIpovqSpmDbwAGsfLfvGfSzU/DVINZyA80rAlC7jqYk+5fzRE+LhW9PSi88 nQYcsKJG0Am9ycgpHQrFJy8frt3tZbSoK+BnRzUeS9HXRgtMXALCZOQ3KNRW3P9jv1IX Iqwn/TBoLg/UQYSq/EK85dF0EK1ZBV39zT5DahSS3NPQy/aoxZVp6Zt+nmiHT6FXKPzS D/HQ== X-Gm-Message-State: ABuFfohf2So5Gh/OLh/MJDEhTVmWO3HFjacfFpKO66Qtt/i/dbzqMNm9 lGyUbvAlH204USnKdWqpzn46LR8OgobrO6UKFv6889U5 X-Google-Smtp-Source: ACcGV61PREMMC2Zt7F6z/u0Ivqrnv0Hn0UNCZBYIzA8aQzTsHWQHPRDutiBf1Wh/H69W4xW9DxfzsDaQWZyRVTvtgbI= X-Received: by 2002:a17:906:92d8:: with SMTP id d24-v6mr15062942ejx.96.1538497997630; Tue, 02 Oct 2018 09:33:17 -0700 (PDT) MIME-Version: 1.0 References: <1535719857-19092-1-git-send-email-alejandro.lucero@netronome.com> In-Reply-To: <1535719857-19092-1-git-send-email-alejandro.lucero@netronome.com> From: Alejandro Lucero Date: Tue, 2 Oct 2018 17:33:06 +0100 Message-ID: To: dev , Thomas Monjalon , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 0/5] use IOVAs check based on DMA mask 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, 02 Oct 2018 16:33:18 -0000 As I was told, I sent this patchset early September (actually it was still October) for making it for 18.11. I wonder if this will be applied when doing the integration phase or it will need to wait until 19.02. On Fri, Aug 31, 2018 at 1:51 PM Alejandro Lucero < alejandro.lucero@netronome.com> wrote: > I sent a patchset about this to be applied on 17.11 stable. The memory > code has had main changes since that version, so here it is the patchset > adjusted to current master repo. > > This patchset adds, mainly, a check for ensuring IOVAs are within a > restricted range due to addressing limitations with some devices. There > are two known cases: NFP and IOMMU VT-d emulation. > > With this check IOVAs out of range are detected and PMDs can abort > initialization. For the VT-d case, IOVA VA mode is allowed as long as > IOVAs are within the supported range, avoiding to forbid IOVA VA by > default. > > For the addressing limitations known cases, there are just 40(NFP) or > 39(VT-d) bits for handling IOVAs. When using IOVA PA, those limitations > imply 1TB(NFP) or 512M(VT-d) as upper limits, which is likely enough for > most systems. With machines using more memory, the added check will > ensure IOVAs within the range. > > With IOVA VA, and because the way the Linux kernel serves mmap calls > in 64 bits systems, 39 or 40 bits are not enough. It is possible to > give an address hint with a lower starting address than the default one > used by the kernel, and then ensuring the mmap uses that hint or hint plus > some offset. With 64 bits systems, the process virtual address space is > large enoguh for doing the hugepages mmaping within the supported range > when those addressing limitations exist. This patchset also adds a change > for using such a hint making the use of IOVA VA a more than likely > possibility when there are those addressing limitations. > > The check is not done by default but just when it is required. This > patchset adds the check for NFP initialization and for setting the IOVA > mode is an emulated VT-d is detected. Also, because the recent patchset > adding dynamic memory allocation, the check is also invoked for ensuring > the new memsegs are within the required range. > > This patchset could be applied to stable 18.05. > > v2: > - fix problem with max dma mask definition > >