From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id B4E1D95AB for ; Wed, 27 Jan 2016 14:41:29 +0100 (CET) Received: by mail-pf0-f173.google.com with SMTP id x125so5269512pfb.0 for ; Wed, 27 Jan 2016 05:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AVVvFLnEunuE8RzgTuxIVRxpXHDGXSanUVMNdpyLx3g=; b=xXuCOBkFyplin0QRNJOAJz+ixWnGeFQbKmzv3uWIpQcvI31MPxJawoWfnOeKSrqx9w d7Emz+q7OvUhyL6O/9wlICut2PK7L5XbAyCIwIpbfY5lFKjH32N7t7VKAGTBsbeta+3u cq0QVGVgRzLAB4NbNJqIXlqEHM7jKWuDUvyoCsEDfuq5NKirEJEjtnte+CEjcoo1O5F+ vNfTczRaPWsY7rl4u0/NEMppnGcDZH1LsqGSZKgu8NiPCBbVnM95OjzUb+lU73eNk1N5 sGJRl+2y8mAcO6CI/CseXi5DWk0pHl5ZpEODDtCMS0eEQgBR9hGhwRqHgoXiNcxvF3hn 8rOQ== 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:content-type; bh=AVVvFLnEunuE8RzgTuxIVRxpXHDGXSanUVMNdpyLx3g=; b=Z2VOraEstAY6pHk4hNXlNVKBUIOF/C9IVekT0kclv/bTlHnFE5PUdiK0NWchmfA7yF LDVzjr7gvgxbV7ET0U6nFsQT2gHWF07Ysor4lccsVM5rvxjLczOg8NSVf5uHOb/8eaH5 G14qfZexHCq60gEX5NgvbDEnismKp/vGtaYKFGDUaHDE3eAyQiyGHmEnHRkxE0207fgA QAk7bAhbJXfNyaoutLLTnTHmXKNzx7UC1AiTqZwEL3lnaeF/uYfb/s4itQ7Qh7XILaF+ ThXusbz59kN8DS5nd4K/QTMnuzl+jxLUr0ZBnVAWIcsKGOAH0Aa+JcmIUetbPNq+DHHV dcWw== X-Gm-Message-State: AG10YOSWtq8NGWRxoBfXjvw/psyg7OMuJRGiYMLZFYfF+IyGHYNiCTIukrJuF69d3YOGxV5kyE81CW3XWQ6+Nc/S MIME-Version: 1.0 X-Received: by 10.98.12.131 with SMTP id 3mr43203247pfm.155.1453902089127; Wed, 27 Jan 2016 05:41:29 -0800 (PST) Received: by 10.66.196.81 with HTTP; Wed, 27 Jan 2016 05:41:29 -0800 (PST) In-Reply-To: References: <20160122172159.5655.55830.stgit@gimli.home> <56A56A48.9090405@ozlabs.ru> Date: Wed, 27 Jan 2016 19:11:29 +0530 Message-ID: From: Santosh Shukla To: "Burakov, Anatoly" Content-Type: text/plain; charset=UTF-8 Cc: Alexey Kardashevskiy , "dev@dpdk.org" , Alex Williamson Subject: Re: [dpdk-dev] [PATCH] vfio/noiommu: Don't use iommu_present() to track fake groups 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, 27 Jan 2016 13:41:30 -0000 On Wed, Jan 27, 2016 at 6:51 PM, Burakov, Anatoly wrote: > Hi Alex, > >> On 01/23/2016 04:23 AM, Alex Williamson wrote: >> > Using iommu_present() to determine whether an IOMMU group is real or >> > fake has some problems. First, apparently Power systems don't >> > register an IOMMU on the device bus, so the groups and containers get >> > marked as noiommu and then won't bind to their actual IOMMU driver. >> > Second, I expect we'll run into the same issue as we try to support >> > vGPUs through vfio, since they're likely to emulate this behavior of >> > creating an IOMMU group on a virtual device and then providing a vfio >> > IOMMU backend tailored to the sort of isolation they provide, which >> > won't necessarily be fully compatible with the IOMMU API. >> > >> > The solution here is to use the existing iommudata interface to IOMMU >> > groups, which allows us to easily identify the fake groups we've >> > created for noiommu purposes. The iommudata we set is purely >> > arbitrary since we're only comparing the address, so we use the >> > address of the noiommu switch itself. >> > >> > Reported-by: Alexey Kardashevskiy >> > Fixes: 03a76b60f8ba ("vfio: Include No-IOMMU mode") >> > Signed-off-by: Alex Williamson >> >> >> >> Reviewed-by: Alexey Kardashevskiy >> Tested-by: Alexey Kardashevskiy > > Tested bringing the NIC's up, encountered no issues. Curious if it also works for Santosh (CC'd) as he's one of the intended users of the No-IOMMU functionality, but otherwise seems to work. > Yes, Its works for virtio dpdk case too, Tested-by: Thanks. > Thanks, > Anatoly