Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1499850iol; Fri, 10 Jun 2022 08:43:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd6YJhiJACZWbSB1/JFWGwfJVWVZcNtClP0Y+ennUZT0H+6aqEibYYb0bQsP0IV2mQFieo X-Received: by 2002:a17:907:7810:b0:6e7:ef73:8326 with SMTP id la16-20020a170907781000b006e7ef738326mr40785498ejc.429.1654875780524; Fri, 10 Jun 2022 08:43:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654875780; cv=none; d=google.com; s=arc-20160816; b=ICVZE5nTCvYFBVmnlHvB+Crredhgm/uqZLjlA6bj8e8iBN4JMkDZCdO8/AN9eq7+Yp gW4DqQRQs27PXC4GSBURyZgT/cos8baQsL1Pmm1oUKXpjbtZzXio3Y/fVkkPiT3JfbBe vkfpMVb245lROif7TwvPOZSasLsIpUS7uBYfDBilAzYhpRNIp0jWX0QZw9TPaQWw8bUZ wOniyYeCDs6myRNpp2PchvQngOi5psFYp9Info1pfmCCrmFVaVCZrqqUZKxVPWWttSLB G2mD0fidp86+M+rWSx/BPfXrVskn/j0V5gGs/4BtS+fPX5aBp+UODNG5YSeM9p96lr0w Dgzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=hNMw/VY7keFLfVjdN/QWGRS4ByaRxT++uwokj8Zx7uM=; b=J3Pl3OVK0oUcmaYoT4XP+0DBDn+tbkfPIwQByYkYAStk8X9I0/vCa7kg/eIVNvqUA3 BIiStSp1H0ahbWswA8NmsGoFcPttIwn9vU4XclWnTpOHEBE0SkZpdXkCxpbtQ7VVy8JU nG8ATcBNeOgzj1Eh+cS2Yn5IiKrhBzs0K0iveBIHI6bxKGa5Sq2b9ES03fr5sUBQNVqP R/oBs3KZ2iSseA+UBV5XMktT3U2mDR+OZx8YlPcyVsIlO3/W+UJvh3dE2x9uTfGXeLZF RkXFzCmRWYu7Zhhp7Ewc2RXnRp9dI7jjqvLoee8tpfnteM1juffFzevIuxb50Be3VIj8 mLqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a1709062daa00b006fa88dad76dsi19068196eji.193.2022.06.10.08.42.34; Fri, 10 Jun 2022 08:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242810AbiFJPiK (ORCPT + 99 others); Fri, 10 Jun 2022 11:38:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233903AbiFJPiD (ORCPT ); Fri, 10 Jun 2022 11:38:03 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0938326562F; Fri, 10 Jun 2022 08:37:58 -0700 (PDT) Received: from fraeml739-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LKQ2n144hz689ML; Fri, 10 Jun 2022 23:33:05 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml739-chm.china.huawei.com (10.206.15.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 17:37:56 +0200 Received: from [10.47.88.201] (10.47.88.201) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 16:37:55 +0100 Message-ID: Date: Fri, 10 Jun 2022 16:37:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3 3/4] scsi: core: Cap shost max_sectors according to DMA optimum mapping limits To: Bart Van Assche , , , , , , , , CC: , , , , , , , References: <1654507822-168026-1-git-send-email-john.garry@huawei.com> <1654507822-168026-4-git-send-email-john.garry@huawei.com> <31417477-953d-283e-808e-cf8701e820a8@huawei.com> <5b214e95-dd95-551a-496e-a2139a74e8eb@huawei.com> <9b1d155e-28cc-08dc-5a5a-8580132575e7@huawei.com> <23bf4427-41c3-bf1d-903a-75928bb47627@acm.org> From: John Garry In-Reply-To: <23bf4427-41c3-bf1d-903a-75928bb47627@acm.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.88.201] X-ClientProxiedBy: lhreml727-chm.china.huawei.com (10.201.108.78) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2022 21:34, Bart Van Assche wrote: > On 6/9/22 10:54, John Garry wrote: >> ok, but do you have a system where the UFS host controller is behind >> an IOMMU? I had the impression that UFS controllers would be mostly >> found in embedded systems and IOMMUs are not as common on there. > > Modern phones have an IOMMU. Below one can find an example from a Pixel > 6 phone. The UFS storage controller is not controller by the IOMMU as > far as I can see but I wouldn't be surprised if the security team would > ask us one day to enable the IOMMU for the UFS controller. OK, then unfortunately it seems that you have no method to test. I might be able to test USB MSC but I am not even sure if I can even get DMA mappings who length exceeds the IOVA rcache limit there. Thanks, John