Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2241079pxp; Mon, 21 Mar 2022 14:44:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo2UhQVaGwDVNyHU+DqDIb2WXGzgi/dKFboR3ElyHBw7mNWX2UOMvx7lp8X47UIvkIK2NG X-Received: by 2002:a17:90b:3a91:b0:1bf:261e:7773 with SMTP id om17-20020a17090b3a9100b001bf261e7773mr1214500pjb.155.1647899058299; Mon, 21 Mar 2022 14:44:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1647899058; cv=pass; d=google.com; s=arc-20160816; b=vFCXieU9KdkAIVUduAuXmUL0SFuBfKvVQVBz/s7PfZu8yQblIpKK/tJa/4Cc27euVG hcvbbFvv8tsnIHcrFtW45GwRROH1ne3MvfHJFZcgCTvYM24yHNY12CQiG5H20OwfHFBo 39pyRjUV/TjxmHMzGdbrTZrByujDFnr3mKEQZ3ztlzjU2Z8yUHcq6xqSS9AbHFIFWc3C f5q5/9MC8avzzMwITNxWtz2dYVlgvGteZlUxh8Iw8OZlgfxvq3+el87AaQ8V+gi0AGlg 1crpnvAaDep5v1K9j9SX+xZPdJjsInYllRN19DethPzxiFkwzE/KGWpn6pizIWXcknxc /0hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=W8T7dQq3Ggb4C9I7wBC6scbBeEdjKR1CveuNsmXlcyM=; b=fUEC40ZinFlws5UuwnPgLOV1GcmMoFmFLEdnx496jMFzCHOh+lZ1jKG0V6Tm/rWsUJ QZaOL8fQK5azzuING5rLPQjHA9pj4/F48LCjKI5DY11TLHAXfMAvTs9PfsDMd1bLEFyx dZm5mQqgl2BB9orYQ6uVsHfXLQ3uV5xb22G4KpI8r8XbXUiNd/nTZ5MjDFUF7UKJ6jxU kXdAabApEX2s2tMg86cn4VbO6vfIegX7ddhdrdQlBbkRj7FPEjqNzWCg+jBCxsOX7ZHE 9SvtH7+mOtsNKO7L03P8q2LgcFOR6j5Md5J5ebHE1sKO1nWj/BYv6Mpv/uPzjZW9ZSKe 0ftQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=cB6ez0dF; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c9-20020a631c49000000b003816043f132si13793180pgm.807.2022.03.21.14.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:44:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=cB6ez0dF; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 88C9F2AB895; Mon, 21 Mar 2022 14:16:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244143AbiCUL76 (ORCPT + 99 others); Mon, 21 Mar 2022 07:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345937AbiCUL7u (ORCPT ); Mon, 21 Mar 2022 07:59:50 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0C71D0EB for ; Mon, 21 Mar 2022 04:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k+xqZjtUD2Hkayh3vuAwynzn/bViPYzk88c3n9K6LFPAP+GpGXe6mE0PkRlpXBRlpt7KzGbWfidoi0aGdZDqulIrckvt87c7+4jukGT3jfi60Kj0z34KJFuA2QIy1CkYebF0Gbpj6Tawbh/XxOumaDQodGiuj4bZ4gb4Y38ouQZI9mYCInpuup3vldc7GmPOedXTtmSO2uPhacIcN12tBAua0GFpzR1hMuEEsBQIewTRVBWF3YtCxRaONG0oro7AGrShLf/zbU3ERXVhrSgJ/u0Nqmi277pJi+Ghsohsbxi9pTTJWnVgnlOKWMiVPC7t65rj1kux5Di9Bhjvt6z4Nw== 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=W8T7dQq3Ggb4C9I7wBC6scbBeEdjKR1CveuNsmXlcyM=; b=jN/2CWDFtAi6+0OdZ1eyaaZJHBhJtOWHHoBnH+va37yNBPLlcfcojcyfa3f6WSFKp6LTfRQP9EB2XNncGgl0d1RXOZbFEEGzvok1v2sDRegB2GvK7R06uI6RtuRSGRo+yWLqfb0hy60hgQh0DArii77wi0dSiaLtRrAlBWcQTGrNJr5pP/bS4FxiSOLR+AZDtNJOY9Uyjuh+Y1iuxKbkjqJc4aB8q9SGkLkfvC2CWyN4cX1M63Yo4MHz8tAIi0/eRL96gCznltakPhz1Vyl9pknIPQllcNcr4Qad9eLyuJ9O0CNy+kgG1E3gE2A3eAfCewpGuPPs2DYsVXM/vWda7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W8T7dQq3Ggb4C9I7wBC6scbBeEdjKR1CveuNsmXlcyM=; b=cB6ez0dFdnK61Xx7gCHYEdKd2iHN9rkMKq9Fpo7GU+x+WHHz/TYKGI5HBKXobjPzKv5sfFjc70wY6+HWs5TMrLONALV1r8tkfP9uWbqOJbhr3TtK+0H/oYwNFdorv+46yBpNd9g83X2XCd+ip1kG8NsbctYBpRKjhc5kssogG/sNn8OE1TU9E/JXf9t1E4+KT9xmmkhP2f2OHDrQ6LbpzCWs2t9DNvdeU2BRMbeQd2wZ+YRuoQGRgbsU+fhMiOHL1yYwIf1qAMqvZO3TqU9Rd0dnwrTDvREt6uU6NK14GpHIt0TPc5Zvc+zjXoJO0tomKdH1QGs4GNWbo2k2DLN6rw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) by BYAPR12MB2933.namprd12.prod.outlook.com (2603:10b6:a03:138::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Mon, 21 Mar 2022 11:58:22 +0000 Received: from MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::11a0:970a:4c24:c70c]) by MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::11a0:970a:4c24:c70c%5]) with mapi id 15.20.5081.023; Mon, 21 Mar 2022 11:58:22 +0000 Date: Mon, 21 Mar 2022 08:58:21 -0300 From: Jason Gunthorpe To: Jean-Philippe Brucker Cc: Lu Baolu , Joerg Roedel , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Eric Auger , Liu Yi L , Jacob jun Pan , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 05/11] arm-smmu-v3/sva: Add SVA domain support Message-ID: <20220321115821.GL11336@nvidia.com> References: <20220320064030.2936936-1-baolu.lu@linux.intel.com> <20220320064030.2936936-6-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MN2PR03CA0005.namprd03.prod.outlook.com (2603:10b6:208:23a::10) To MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91430131-0432-493f-510c-08da0b321912 X-MS-TrafficTypeDiagnostic: BYAPR12MB2933: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: 2geR5muLbI8KjltTDpoPA5ao21ek2p34Zay9Y5gROeRcpJJoK2ieX3fOV3Ry3HrcFGTs0bdss8suLmB3cDQOhJt6qPcyrd04UZi33N9ikFWFJ6ypDm7FhwHgkSkCjJKg5oN1bstU20Tsvc7RHyNwjZ4SHJzdcxXaZWrxtAcQxTado1AiV+cGwlmc5daMd0EVl49GTA3u6LeJRgrPHHE30757pfcfdiCLN8hnfROhmmTqDsZYCNPr1qMPUiWQ34+e1+o0gJJxjIVIi5fMY2+u4AaegqIFyImN4VauQDkkycolYA5cIJk1pr5LW9TWr5yZa8Fq6m1STy1o/f+n9rJNlSH0dK4oszm/Lbsg/8+mCxAzeGNkCBKJTdM8OiGL7fJ8jqiqEa1DAJNtSgCMH4tkY8HjEMD7hIFMHvLwzVBTEKGpSg3epqHcgKIcGcOsyJsq4fghYsGGN7PLmsw31jXYHDzAKTAkJiBy/IccdJRivxNY8b2x3J6u9TCrkxYLL7Zwv7rORBgGBFHqHAe2vMNUk3WeeQ0K6au1qF8NaoJwIyO2nW6lhIKOk+iBpi+TRvnwOzNkWEYBenySiWUVCxWSaGslWhozEot400FHjoI+3hbsb678HfaqomYIif4NNs9Zuhv6N9bOEkJriQ172qJbPA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4192.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(508600001)(6512007)(1076003)(2616005)(26005)(6486002)(36756003)(2906002)(33656002)(4744005)(86362001)(4326008)(316002)(38100700002)(8676002)(66556008)(66946007)(66476007)(8936002)(7416002)(5660300002)(6916009)(54906003)(6506007)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FzV/sFE8tvnGnp+c4IGYkgyWEtiSg2A4FwkqODN9zTbtvuJdnKiAigKGx2k8?= =?us-ascii?Q?DP7P/qTqrcIzWZrc9pgg8OB8PTY5oSAxzLv468UGsBV9leDdhZMxbwmWEVYP?= =?us-ascii?Q?3gYyQEi4A1EupLWITE3NcepJQsLj1t43gSmP22r/1qaHpqPx0mlDzN69TIRC?= =?us-ascii?Q?JEumT8IXTUcM6Mp4DvNvwIL3SUBihfLlY8FYk4VjgiwIqcvpT0bcFMLZPxWY?= =?us-ascii?Q?zzQn9A8jBMjUBYxvWPU4J99Tymr4+32HwqQNRKFI6f3REXAo+76NGhr0/+dZ?= =?us-ascii?Q?ZDXS4rEmvvOZY7T58PSNHJSiJiL8dJnq4Y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rcwNMv8IgyO+rOgxgLmBGXgLscb5F5OxLGr/+r7ks0mSloSs/?= =?us-ascii?Q?SVRALXLNL2yA9jccpePTJRbgb/qX0nm+eBGSzqvtcgUqTFw6IAcLLfVFjXCJ?= =?us-ascii?Q?oYjlE5UmJtIgbtdMQy807MA+X2iutVYjEai48/KvleFH9WNoN58vqColFfoV?= =?us-ascii?Q?N8sYQ8fe1rCXbsHuIrCelonUaQopCoJoCsiJjND2y5vxYhDI9Wi1Agn+1X0W?= =?us-ascii?Q?UqpWwVTnuNUyJhiXseTWbjgBSxxmZ6nc?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91430131-0432-493f-510c-08da0b321912 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4192.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2022 11:58:22.4184 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GwYqXY3IctYLUt0RpxRXq2XxzpkzEVwMm18VlZPSvi0rHV6jbAAikdY1nDZqQIm+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2933 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, Mar 21, 2022 at 11:31:19AM +0000, Jean-Philippe Brucker wrote: > For now we could just return a naked struct iommu_domain. Sanity checks in > arm_smmu_attach_dev() would be good too, a SVA domain can't be attached as > a parent domain. Now that we have per-domain ops the 'standard' arm_smmu_attach_dev() cannot be called on a SVA iommu_domain already. Jason