Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp541830img; Tue, 26 Feb 2019 04:38:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTe8gB07fMVeo1WPl5cKnBA8eGsBrGss1IM/N1GHbeCSgtvlLrGSlLKBtNuN9rfv2Tu7+B X-Received: by 2002:a62:35c7:: with SMTP id c190mr26393481pfa.76.1551184725636; Tue, 26 Feb 2019 04:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551184725; cv=none; d=google.com; s=arc-20160816; b=OD87OpU1q4w56wFxAkeU5HmV5xYkXANxDooF+9lOftmRa0m4D0xFRLwC0D6x0EwLxS bVSxuM7+FpfqWUaPbwybClfj8/NM2jLL+0hTw9t0Bix1QuMdZBAd3ms20yiw/iuDAXAt MjSlFzBdkC2uLprStM+OlE1TBvZJIlxJBs2hA76JpoHv7WbyVHavV7blCc0TxXo6YuZ1 BmZghE90uF7a64PsH9/qYHwib4+lZDq1PmrFsNOVtIW5POOxn5Igrb5AcY7+BqRaDhwU WKu+LxTTxvE3t9CXfNPlXMe0j6Td3VGXuwpgBmwit+BCC3YoO/ZHgl1cruYRMCpoLfS0 8DgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=FIFlfAthQL5nLqTM5nfPWbZnJSesbHnxvmhfQ1wDkh4=; b=EUsrinyE4er/69kgdR1GZjb7ANGtzdSW0JGqxFhyGBxDCEQkABkZMzCu9PXSjh+Sdn s3a3rySXdjBxUlPp+71kRas/4o+ZLrdsOtDG2YN4KZQXdSy+XvqWedsCuZ06FHi/Wb9K LIXeCvI7/d+X0I2dj1UUSdNZFIzNBOJbifJN3XFA1Xi8NQjHYFRXU+9CSgSroXeSg8uQ bVsk9b49ExnEr+hC9MKGyb2zGP/VuHoOeOR+6HgVCCzARTiqYcmwaS4uPyvY/dqxY0Nu xwE3Z+3FRA7ej4diO11VyZvmRhXYMHSq3a7O2pktnJvwP7UpPPszITghcMT44RZWaG27 lecA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si6871528pfc.23.2019.02.26.04.38.29; Tue, 26 Feb 2019 04:38:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbfBZMiG (ORCPT + 99 others); Tue, 26 Feb 2019 07:38:06 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:4739 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726063AbfBZMiG (ORCPT ); Tue, 26 Feb 2019 07:38:06 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B5619BB2F09F9F440D87; Tue, 26 Feb 2019 20:38:02 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.408.0; Tue, 26 Feb 2019 20:37:56 +0800 Subject: Re: [PATCH RFC 1/1] iommu: set the default iommu-dma mode as non-strict To: Jean-Philippe Brucker , Zhen Lei , John Garry , "Robin Murphy" , Will Deacon , "Joerg Roedel" , linux-arm-kernel , iommu , linux-kernel CC: Yunsheng Lin , Linuxarm , "Chengchuanning (Hisi-Turing)" References: <20190131135211.6732-1-thunder.leizhen@huawei.com> <94b9b0c9-1a24-63ba-5abe-5f6d79fed415@arm.com> From: Hanjun Guo Message-ID: Date: Tue, 26 Feb 2019 20:36:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <94b9b0c9-1a24-63ba-5abe-5f6d79fed415@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jean, On 2019/1/31 22:55, Jean-Philippe Brucker wrote: > Hi, > > On 31/01/2019 13:52, Zhen Lei wrote: >> Currently, many peripherals are faster than before. For example, the top >> speed of the older netcard is 10Gb/s, and now it's more than 25Gb/s. But >> when iommu page-table mapping enabled, it's hard to reach the top speed >> in strict mode, because of frequently map and unmap operations. In order >> to keep abreast of the times, I think it's better to set non-strict as >> default. > > Most users won't be aware of this relaxation and will have their system > vulnerable to e.g. thunderbolt hotplug. See for example 4.3 Deferred > Invalidation in > http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/2018/MSC/MSC-2018-21.pdf > > Why not keep the policy to secure by default, as we do for > iommu.passthrough? And maybe add something similar to > CONFIG_IOMMU_DEFAULT_PASSTRHOUGH? It's easy enough for experts to pass a > command-line argument or change the default config. Sorry for the late reply, it was Chinese new year, and we had a long discussion internally, we are fine to add a Kconfig but not sure OS vendors will set it to default y. OS vendors seems not happy to pass a command-line argument, to be honest, this is our motivation to enable non-strict as default. Hope OS vendors can see this email thread, and give some input here. Thanks Hanjun