From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E24E4C43381 for ; Wed, 20 Mar 2019 11:45:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F9EE2184D for ; Wed, 20 Mar 2019 11:45:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fLeHWXrD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zAQFlvTY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F9EE2184D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YR6dyMYTWa+9utW68eMDEnAny9Fihut6dlEIBbQZQvY=; b=fLeHWXrDVHi8aP cikg6BxGLGredxD4OQrsgZ01gCiZlKx1PwX5woScJEjz321wIFtQkluABChIIqiuXg4dxp1Rx5lZZ GX6zzzZjvhNF2Jw+o29B91x/mdsl144iE5WMhJkWg7hXQ7Z0HRpzTteeTpj9eKTvpIPqC5mRobyEL 8rlK+iJrxEw2HU/yROaw/A/s+axkSDsLgrSg8W2Mq8gQTrAaVHHz4PUGj4H+4FmgFVZH33rWhgtsk VDdlQdwPFVSkuLwSGFOehEwuUotYrsUvRT+H2M8if6wtghTG/KCInbL4WFvC3m+P0TbK3vxN8lShc DvBTIZyKY3Lls3Mgw/Jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Zeg-0000HK-Tn; Wed, 20 Mar 2019 11:45:10 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6ZeU-0007xD-KM for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2019 11:45:00 +0000 Received: by mail-oi1-x243.google.com with SMTP id b4so1507785oif.6 for ; Wed, 20 Mar 2019 04:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Pb9BBWRMDf0NMbm5WI5qoWMAvnwsvdVTg76HNYPXrdE=; b=zAQFlvTYOBHLpoCFXuN78FGCf2O/JqnuWJS6zP/rwWDolySAwreRWu6MhuCKZqo2gN a5eQWd42hyW1hCn1SEYG1FyJKvTKyIEGleRIWNSGFaFJfdXafI4RU3bqKsh5kIUHPGnW IhobsAfnCiPkwpJwZQk3+QyNXbX1OKPKW9YWiTZ9LCQZiWug1vBZN2reIZS/I0deZmUk JjzKGoQwJofSD8OAvOrHeQ3Q9Y657QqOBa66Zkru9rArlPZYCVGmX4ZJdFA+UNUkE+K+ pbqiy/IsOJdQb+HnfB/Iu1GuAGanGaLVE043OZEMccDQRxqPZYVFi4M9tle4MnI18RCE JStg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Pb9BBWRMDf0NMbm5WI5qoWMAvnwsvdVTg76HNYPXrdE=; b=gctvy9ZFTGwBh5K21/pdFnqKpQnvYQsi3Pyman03rBP5fB65NZAEUkEVVCVPdAy3pA AYmb6sLZmQAUkEDxyh0xo0wi/ojyWsloW/bw9WTDq5YNWM25MtuIKxY7DvOZxhljhafS 86bzFgUVilVldFxXZR4DW0BdhhHo2rUz4p/zRthjSk0dtJAJ0iaUzaQ0PhnWFK6NdGSM Vjb4K2j+K3h95Nul7o+WS/+cyb6x9xW9Jhtk4R+LVr0bLQJXylqrkAK94vm7zlnR1AMQ kP6JXblgbf2dL508H7+6cZyKSY7t3FQi5WCf7npkJMoSkUvXBInMzsn8ZSh18a98ArVx us5A== X-Gm-Message-State: APjAAAVotIwv0UvR3PTVSItcSExlzOQUiqHlnm3MyuFNW4FqFJ1WHiva nPoSnxt4UKGrw/u+TfyFNZzjfw== X-Google-Smtp-Source: APXvYqya7ruXXcic+5hzX3x7o1Ii1ZMZYPzwT/krtYdKjqHT1eQQ/rUj7AKfRDe7wbeIoI9M4ensIw== X-Received: by 2002:aca:e84c:: with SMTP id f73mr4980047oih.163.1553082296914; Wed, 20 Mar 2019 04:44:56 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id a14sm706759otl.46.2019.03.20.04.44.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 04:44:55 -0700 (PDT) Date: Wed, 20 Mar 2019 19:44:50 +0800 From: Leo Yan To: Robin Murphy Subject: Re: [PATCH] arm64: dts: juno: Enable smmu_pcie for Juno r1/r2 Message-ID: <20190320114450.GB17539@leoy-ThinkPad-X240s> References: <20190320083105.8954-1-leo.yan@linaro.org> <2566ce76-a8b2-c8ac-9f3f-4b99101f7661@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2566ce76-a8b2-c8ac-9f3f-4b99101f7661@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190320_044458_810600_68DFDA5F X-CRM114-Status: GOOD ( 18.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Lorenzo Pieralisi , Liviu Dudau , linux-kernel@vger.kernel.org, Rob Herring , Sudeep Holla , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Robin, On Wed, Mar 20, 2019 at 11:24:18AM +0000, Robin Murphy wrote: > Hi Leo, > > On 20/03/2019 08:31, Leo Yan wrote: > > Though PCIe controller has been enabled on Juno r1/r2, but it misses to > > enable its connected SMMU. From the testing, even without set this SMMU > > status property to 'okay', the PCIe NIC device still works well. Since > > the SMMU is not enabled in DT binding and its iommu_groups is not > > created properly, finally this prevents to enable vfio-pci for NIC > > device with KVM. > > FWIW, whilst it might appear to be fine, there are still potential issues > once the DMA API sees this SMMU and starts using it, which is why this > particular change remains as one of my oldest local hacks that I've never > yet considered upstreamable. > > The IOMMU DMA ops happen to work for light usage now as a side-effect of > 122fac030e912 combined with the current top-down allocation behaviour, but > as soon as IOVA usage/fragmentation leads to 32-bit DMA addresses below > 0x8000000, or full 40-bit addresses, being allocated then data loss and > other problems will happen (for the reasons explained on the other thread). > Similarly, it's also going to be fragile to any internal changes in the IOVA > allocator. > > Until we have a decent solution for handling such 'windowed' DMA > restrictions (there do exist other systems with similar behaviour) I'd be > very wary of enabling the PCIe SMMU for all users who may not be aware of > the caveats. Given that the lack of stream IDs and SR-IOV support prevents > Juno from being a realistic virtualisation platform anyway, I'm not > convinced there's enough benefit to justify the risk. Ah, I didn't connect the 'windowde' DMA restriction with the IOMMU property setting in dt, which actually is deliberate. Please drop this patch and will leave it to you. Thanks a lot for related info. [...] Thanks, Leo Yan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel