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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FE00C433F5 for ; Mon, 2 May 2022 11:57:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C4629817B3; Mon, 2 May 2022 11:57:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9PdJfB6YPmDD; Mon, 2 May 2022 11:57:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9BABF818D0; Mon, 2 May 2022 11:57:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4DC45C0032; Mon, 2 May 2022 11:57:33 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 48FB2C002D for ; Mon, 2 May 2022 11:57:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 35AE160625 for ; Mon, 2 May 2022 11:57:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=oracle.com header.b="no32j41e"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.b="CXIZtcnt" Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1L691_L5DILt for ; Mon, 2 May 2022 11:57:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by smtp3.osuosl.org (Postfix) with ESMTPS id 626E1605EA for ; Mon, 2 May 2022 11:57:31 +0000 (UTC) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2428tWwR018740; Mon, 2 May 2022 11:57:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=rY3o/xlyFOXTFd5uJuRmwlg6LoWCqwmI77dyHjGM1PY=; b=no32j41eWeUmIbWcYOP8FZpJ8d3UEzFtv4DOSX26sIgfp88Gev6O3b2EMRHnG8kg/go0 0VqmfGP7iZABYRo6RQVZ7MK+DLJIUZ1mQKobNcxCKdVMGnNx+NfkfbOMmcxOqSxVials tcAPIaZfi5usVLCJQ7Qvub5mmDHHCKjcXnJY9kn8MiHUEI7fZVI7c5VWecz4FI7CrvDD p8prem9uuV2HRo3zmeP2+79sgxwuvltPpvV8Q5VJlHuEqLMgwx4htmZglPa9sj7+vD4f x0P26A6vIp1iCdhkzn8SrL4uabHiA1CQ6sTWUm9GSCvdlq2BoP3iAAljYSb9ZoChyBBO MA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3frwnt2xu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 May 2022 11:57:14 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 242BuNSj003170; Mon, 2 May 2022 11:57:13 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2174.outbound.protection.outlook.com [104.47.58.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fruj7xsu0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 May 2022 11:57:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VygvmBMxSAaJRgf/01mszO69gnCiu2sBq3oOIDGS775W63A9NFz5F/6O2q7E+daRVDgLP0HRbUWYgwcGwi9dEejPaZVU1+lhKlx1jetCIbXuzJ+IZwU0oiNA1vbIfQF5TZWwlcX+KUpbkPv56qcymu/ZHhDqvYcaYTtOdlSsKTQBmS3gHAoudX68F8AgEJ3hfPzRECMZFyfCiB29fFUxm3OV9LsqRYTg3+4aiGq6QC5tcq9n8KdgVvqe97XbDMbEEbi38GvfiQAcZScTH5CZ7hAnlQdfqHxpRIZHK5TFRImHi34RQcvkIk+S0TKoZZ63nr6hY26rYL2IdFFEzg5wiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rY3o/xlyFOXTFd5uJuRmwlg6LoWCqwmI77dyHjGM1PY=; b=fWh/TxaVyL9sPTMnFRJSWUGKiFwDUGyVJPY+yQFAIbsrDa6Y1HiZ6BmFZWQGAvb2DKQndNFDVg73xUYOGdfmIrdidMnvHUL5rLVxG/S7E4D/rbqK6E9yc65/xE3+YTK+lHp9h9zD2LBDj42CUPoQvrz3IF473UnkpLmcfcfmjV7ZCA15ZvCt2zDbEsiY5aBfI1xJKkJ8YTQalaTPIMxcLlbkuH4O/NQfNwtWxSQIA15+pxHkpxyUFTElP+nrf91CfMWrGgP8OiZtI2Jsny6pta/x51eRIVam7Fid7kdAEb0yzML56aGCsFB8x45X9bhvHB4fv9oHziNlT9rs9eM4IA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rY3o/xlyFOXTFd5uJuRmwlg6LoWCqwmI77dyHjGM1PY=; b=CXIZtcntEMf0zhpGsN24jRHp/huFUyBUXikCIPI1MP9+v/ZKdZ2JaZrqbNQBw2fIRq/u9stPKd8B7nS8eHq4vGfurzgGihuCQ8B10yFgmqLMJdG1pXRlT65Hyfcq3Qf1XSFNyr0ssFSBMcoI8hpCdk2EJpo5v5qDsYT+x2Sm1g4= Received: from BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) by DM6PR10MB2891.namprd10.prod.outlook.com (2603:10b6:5:61::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Mon, 2 May 2022 11:57:11 +0000 Received: from BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::b9e5:d1b6:b4be:f9d]) by BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::b9e5:d1b6:b4be:f9d%5]) with mapi id 15.20.5206.013; Mon, 2 May 2022 11:57:11 +0000 Message-ID: <5febc7d2-fbe1-d734-09ba-0dcc17a401b8@oracle.com> Date: Mon, 2 May 2022 12:57:02 +0100 Subject: Re: [PATCH RFC 15/19] iommu/arm-smmu-v3: Add set_dirty_tracking_range() support Content-Language: en-US From: Joao Martins To: Robin Murphy , Jason Gunthorpe References: <20220428210933.3583-1-joao.m.martins@oracle.com> <20220428210933.3583-16-joao.m.martins@oracle.com> <20220429122352.GU8364@nvidia.com> <20220429161134.GB8364@nvidia.com> <8b01b261-7385-8247-4d19-3ac2dd2306b1@oracle.com> In-Reply-To: <8b01b261-7385-8247-4d19-3ac2dd2306b1@oracle.com> X-ClientProxiedBy: LO4P123CA0300.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:196::17) To BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 622d9329-855a-498d-eab6-08da2c32e3f0 X-MS-TrafficTypeDiagnostic: DM6PR10MB2891:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gy4cxtgZf9ErQnmGE6Qvwp5pjNq22pwEPW13bRie3mwfTUR7alGBYz23RCyJaH9e8vfbKaHaOc4RnmXRVuuNxMOQBf6+kQMqizbs82d+awjZ64d6NngTMD2upJvIMrjiWEn5yazoty7BFo2JohNiXeSYF5kSo5spe39begwUMLRV+WAjXe58UK3yqNQOTnx0xHtyeHrFYF3hK8wraPjy7DUEjg1Lhhr1LjWtMa7gPPZi3hUi9R7ykrpDVpCGOObHXeLVbVTkil6vUchY/vkT39wHH3PKupMNsCngcrOE0mw11+HqUY+XyPNmHBZSTASoRZRurm8Cu63X+XPylYcN9+EQXXuVsaW+08YKqyQXuRtx3rxxSoj47F0qVHmkRhRDu9ulJ7domjZd4dAqdUq9X5ZSXoLzUPuw9LRma1Nnfz2SoiY7g5knKdP/3UcaQU7yKSlrcpdDX17Zb0a+clJLqDEbEr+dErH14DATZeBpXRRtCBPs/Sg7fFZTRV2LwydRvnsAUdz8Ez0yGCc7VaDN1ToFKc08fJLHYvXEB2enYnNL7glEhiXQr1QU9r48IHkmkmhsYPz0tDiDhL60axbXgLMmLW+uSQfnuM4SISrD2DN/AP5S5s+aKi19zCycfhN0M/T0A9NB4cl92oc9X1U8/8eZMy/ArPTqgP4vwv5IzGuYi3tD657x+JuycvOmql5SkAQFb15GTXUCMwvjIRX1W2fMejE2VJOgKGqIXN2mFuI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BLAPR10MB4835.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6486002)(508600001)(2906002)(6512007)(83380400001)(6506007)(6666004)(38100700002)(7416002)(26005)(110136005)(8936002)(31686004)(54906003)(36756003)(2616005)(31696002)(53546011)(316002)(186003)(5660300002)(4326008)(66946007)(8676002)(66556008)(66476007)(86362001)(14143004)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cVpJV2d6ZWkrSUdlNzhZU0tPS1J1dUtJU2ttUmxGWFdDQVlyb29rMVdjRmJr?= =?utf-8?B?aHhzaG1tekhzclJ4ekRiS1RyNlIwdExiVnMzbDEzZzFQeGwyTjVMRGpiVzBP?= =?utf-8?B?RU1zVTZKUHh4c29uTXBJazVTT0l3ZTByamRRNUZMaHFxVThHQWxTRkJnVWYz?= =?utf-8?B?NFdqOGlTdCswS2tyaVlZcVlJWi9UNSs2dmlST0VzVTB6TUcvVG1HaGozK2Qy?= =?utf-8?B?Ynd3ZGVYYTFMakhSNWhITElrM2E0bmQwb0sxbSt5Rk1ObEZFTUJYb1dGeS9w?= =?utf-8?B?VCtGUURaanJaUW9KdmMram5tZlBrcjdiemlZTXZWRlBmUGl1YWszUnZvSWdI?= =?utf-8?B?bzhhV0MwZE9BazN2aXdXRDlHMnA0L0xvYVdQWmtuK1hEd3YzVis3N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WhPQkV4cmUxdW50c0haTldKeis3QUQ0?= =?utf-8?B?bGY3MmJ1cVA0c3ZtbW5CbkZGWlFBdzN5NEU3SDdBeDdPNWFacnZ3LzBKOUNZ?= =?utf-8?B?b2I1OW9hSU9DUzFDL1RpKzZoa2VVUm1GdVFOVmVTUUhJUmJmTnlkUDMzeUg4?= =?utf-8?Q?2lRKfBOXMWFzm7rE=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 622d9329-855a-498d-eab6-08da2c32e3f0 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB4835.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2022 11:57:11.3205 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HqoAjOp5mkSghrs/zOi4pJY+IOb3L0MsxuLdmD0ePabyYdoCKRCuq5MGzMPXRK0yuVZm3sL6xrjPUlTjKvxKcEbgVSM5ion+tsLeBzKMYGY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB2891 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-05-02_03:2022-05-02, 2022-05-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 mlxlogscore=557 mlxscore=0 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205020093 X-Proofpoint-ORIG-GUID: eIQ06VjTqPsVrbwzw1uldgSkWg96iQid X-Proofpoint-GUID: eIQ06VjTqPsVrbwzw1uldgSkWg96iQid Cc: Jean-Philippe Brucker , "Tian, Kevin" , Yishai Hadas , "kvm@vger.kernel.org" , Will Deacon , Cornelia Huck , "iommu@lists.linux-foundation.org" , Alex Williamson , David Woodhouse X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" [my mua made the message a tad crooked with the quotations] On 5/2/22 12:52, Joao Martins wrote: > On 4/29/22 20:20, Robin Murphy wrote: >> On 2022-04-29 17:40, Joao Martins wrote: >>> On 4/29/22 17:11, Jason Gunthorpe wrote: >>>> On Fri, Apr 29, 2022 at 03:45:23PM +0100, Joao Martins wrote: >>>>> On 4/29/22 13:23, Jason Gunthorpe wrote: >>>>>> On Fri, Apr 29, 2022 at 01:06:06PM +0100, Joao Martins wrote: >>>>>> >>>>>>>> TBH I'd be inclined to just enable DBM unconditionally in >>>>>>>> arm_smmu_domain_finalise() if the SMMU supports it. Trying to toggle it >>>>>>>> dynamically (especially on a live domain) seems more trouble that it's >>>>>>>> worth. >>>>>>> >>>>>>> Hmmm, but then it would strip userland/VMM from any sort of control (contrary >>>>>>> to what we can do on the CPU/KVM side). e.g. the first time you do >>>>>>> GET_DIRTY_IOVA it would return all dirtied IOVAs since the beginning >>>>>>> of guest time, as opposed to those only after you enabled dirty-tracking. >>>>>> >>>>>> It just means that on SMMU the start tracking op clears all the dirty >>>>>> bits. >>>>>> >>>>> Hmm, OK. But aren't really picking a poison here? On ARM it's the difference >>>>> from switching the setting the DBM bit and put the IOPTE as writeable-clean (which >>>>> is clearing another bit) versus read-and-clear-when-dirty-track-start which means >>>>> we need to re-walk the pagetables to clear one bit. >>>> >>>> Yes, I don't think a iopte walk is avoidable? >>>> >>> Correct -- exactly why I am still more learning towards enable DBM bit only at start >>> versus enabling DBM at domain-creation while clearing dirty at start. >> >> I'd say it's largely down to whether you want the bother of >> communicating a dynamic behaviour change into io-pgtable. The big >> advantage of having it just use DBM all the time is that you don't have >> to do that, and the "start tracking" operation is then nothing more than >> a normal "read and clear" operation but ignoring the read result. >> >> At this point I'd much rather opt for simplicity, and leave the fancier >> stuff to revisit later if and when somebody does demonstrate a >> significant overhead from using DBM when not strictly needed. > OK -- I did get the code simplicity part[*]. Albeit my concern is that last > point: if there's anything fundamentally affecting DMA performance then > any SMMU user would see it even if they don't care at all about DBM (i.e. regular > baremetal/non-vm iommu usage). > I can switch the SMMUv3 one to the always-enabled DBM bit. > [*] It was how I had this initially PoC-ed. And really all IOMMU drivers dirty tracking > could be simplified to be always-enabled, and start/stop is essentially flushing/clearing > dirties. Albeit I like that this is only really used (by hardware) when needed and any > other DMA user isn't affected. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu