Message ID | 14-v4-c93b774edcc4+42d2b-smmuv3_newapi_p1_jgg@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 008E3C47DDF for <linux-arm-kernel@archiver.kernel.org>; Thu, 25 Jan 2024 23:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tyQVRGck1mdlczbwfwMXlXDgQQ0bBu6coNcQMTNtpJs=; b=CUDJmMR1LOKorM sy8fLymot+sjKCJTJK9Kxj+00EAFQLQYGScSbHiYSRpZoyPNKLXZsEa9+zOcWg+sfnrvfFwlI4HVa wcxXCW1RGHVJ36FH0P8l7GABWST2Hz6aVEWTNi16hKzNxKyoE3aPqxkkANoFWSzp/XFR3T6grx6QJ j+blWGiNObFmMfBK6/Eq7XaMaVoNz7O39i0PNyvfnVG6joncbhKAdYVzlXO/CXUHyvrPQzU5JZ409 d3sWLFcaZAWDWbQqEzZr8o98YmrCGn9nV6XSrAfceBcf8UEFLfZwyN7NVUDR/B+0IGE8thhSMJ1SK ryEtpx966CW/oJiIPejQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT9bV-00000002XJD-3oFC; Thu, 25 Jan 2024 23:57:53 +0000 Received: from mail-dm6nam12on20601.outbound.protection.outlook.com ([2a01:111:f403:2417::601] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT9bI-00000002XA1-0BPH for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 23:57:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jocpm+zsnbhW1SgiojyaZSM+x8BWYweZ8066oMEs/ixclspO0u9zfTDV0pn8Y1zBb6cXt7m3p+pYG7YSRe+4Fvcwv8DD6toEf2akEZIpMQu2nsdgGLHMuQ2oN4BPqsh7lQq8dB8cV6pEE6JDg7tYcqVoBci7izaNl5XCOjoJTEjLUlXA+nV0zEKMUWK75YnfJmRVhfOThWor6rYf78i+RFPKL3aKSGlbN9X/WgHFcQI8shBMuGO50EolPQZC0CPKMaurb9bTrFmqmq1syiq0CrIDh9rlqrUy7ZZNY9Tjwf/1HTE4Ug6CikmFsICRvK/p6OCpcaocZ5fsmMIFfasI0g== 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=QvR4Q4KPkqGBasrfNcco6yE+xMHkkdgAO+RTxEjyyQI=; b=hK4+jdV2e9HCIhI+TAmcfe+ByjQy1etY6gVAMHwUCSIlqcy/ytNZN1s/ju/tPPl88paESgzl7BG2sefBll3DIWJYwiu4yxB2KvXEh/A0YSRcFZ/X+cFcAtstFyQBgCxWuSvEg0qra7C2GwNDG7/7iTW/jUOwdtQL9T3lbcWh6ZQLPrY+6tSGFiIeQyu6Pq+r+2GgiB0/L38YD6PsvCYS+m3G8gfSyUvWPR0g5oWYo1N4jGaZ3HNgGSEYICCELZxnzcExF49kPFi7QjTlt/ZVWJJh1/jz6sKqinfACA29vrtAJRtHDfqjRaF2ODuRAiyowEpZSM9ZHKZuRHKdn4VIqg== 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=QvR4Q4KPkqGBasrfNcco6yE+xMHkkdgAO+RTxEjyyQI=; b=drVbSigi5KYTTLTYnGoVegpSewJFidjRpRo4Jke9oO2Kg5t/SekgjUbx5vpATz8bckvO5eUzACHAvBj1OtyxWoJubqnv+7VFj14hPnyXC2hr7N3fSnbCCCx6W+TpsLaMAm5odTCkBiqmptRze7fa5PNXWGkNsPWlrZzx6pB/F8Re3g6NdBjr+04/txUSWHHHnS+haEVhqbaMOrviWldANnFPMEs6clHyC89wkI1QBrTWKvXDhZFJPy1ROtF0vdV0FoQl0uVzm3JBHjdJWc1KqGzXFz+5fWv6+yuFkllukL38WhJvQhEL0dkemvtQynR3gTSZvX0bbpG5sQcAQzMWlw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by SN7PR12MB7881.namprd12.prod.outlook.com (2603:10b6:806:34a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.24; Thu, 25 Jan 2024 23:57:33 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873%6]) with mapi id 15.20.7228.022; Thu, 25 Jan 2024 23:57:33 +0000 From: Jason Gunthorpe <jgg@nvidia.com> To: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>, linux-arm-kernel@lists.infradead.org, Robin Murphy <robin.murphy@arm.com>, Will Deacon <will@kernel.org> Cc: Moritz Fischer <mdf@kernel.org>, Moritz Fischer <moritzf@google.com>, Michael Shavit <mshavit@google.com>, Nicolin Chen <nicolinc@nvidia.com>, patches@lists.linux.dev, Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Subject: [PATCH v4 14/16] iommu/arm-smmu-v3: Use the identity/blocked domain during release Date: Thu, 25 Jan 2024 19:57:24 -0400 Message-ID: <14-v4-c93b774edcc4+42d2b-smmuv3_newapi_p1_jgg@nvidia.com> In-Reply-To: <0-v4-c93b774edcc4+42d2b-smmuv3_newapi_p1_jgg@nvidia.com> References: X-ClientProxiedBy: SA9PR11CA0026.namprd11.prod.outlook.com (2603:10b6:806:6e::31) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|SN7PR12MB7881:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c133fbc-f9fa-4c9a-54b9-08dc1e016312 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e+W//JuZDJxwEhZTOmfq7ImE39W9WhQtWTy/U+YAXT3pTVs/VYNoW8IcWn4W7cGyP5+2l+bKVLr6yQu6P4ybV4uLLtCZAYXXjdcaNFpz8mDGBUAILPSSytameHAcGZVN+fHFvfO35KV4NVb73q9WVDvEKTe3INnAUatwe0k6hK8gAlr7lChe1meOGw90Oc2qdeaUbA9rZeaa2PItWNMLaImkeSlmeHsjZPTuUELYjYjqrwCM9GGPaPkId0J71GLaLppefwOUTNt6UGuBDc+VP299BldWX2GCpYV/9M+rKEnky09wXnJrDabNZi6CcfDScNszRgPk6G5Pj/e2KPyZ+H1wfIgpU2XZArTwKToA0sd6C/qonaZOaDuWVTJ69zgfSc77YUIjUnvUrsE/g159g/m5rrQmE0FGtMmCFWzA/9T1NLMv3roNlwS+WRwDaVef03YvNewLJezBcfFPPvO2k7uylVGL13AeDUkEPN+zGgGgxyhomcXe4GMVPrgoAIYA0WuDRIRmVt8S1qJan+wPdJ0XunuxW5HPFZ7scqcS15Tw7a9ONuiUmgssYUe7pHo7 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(396003)(346002)(39860400002)(366004)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(83380400001)(36756003)(66556008)(86362001)(54906003)(110136005)(66946007)(66476007)(15650500001)(26005)(38100700002)(6512007)(2906002)(2616005)(7416002)(478600001)(6666004)(41300700001)(6506007)(6486002)(5660300002)(316002)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WMwzQMrPy1FMXsaUZgJ61ni40Suu3hFfVQJJcSujVzhl9D2hsegBNWZawKJRRDrhZ91LNpTqZbg2KOFJE+qq0jc2xSS/PNnVILl8HR+B4HfGdoRVR738KNQ9cFARIUvcQNtcYKSObC1L4v0YVNqb+To1kTi0rACuurv0AONpjF16Qa6Y0Xx7vKS1J5hlAGuImlJAs6t6eAxmyJpX/H2fps4CA8g+5ng0wgX3/kPxNXMHUBdG1pJWb7XUPaDRsJaVPsoTRKLEbGxYPZcL7No1+Daes2U8OCrRHw051/UiGPzJk8geld8w8Ug81rIEXjWN20bURv0zoVewkt2zLib2ULLMdmypCqFALsc5kbM2g9xS/kxv/zB+U4rJcIdSWYxy/e37AA1iC3ooa3kpcJ2wnLH9UVpjIEoP306aemS8J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RMNjpdz8L/7P/7F4F3KIUxersDtLvIwRnCFCywXknceJUABi5P8ch/4lkvyniQ008iX020LXc3CbHCtI/TVumjgQRrIghUfn6 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c133fbc-f9fa-4c9a-54b9-08dc1e016312 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 23:57:28.6388 (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: tLCFYIl3zUCDYLt6ER4K8FU7iazQdlOLMYnx3PdYZOoDD52fWhNrANuWiwJojH3a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7881 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_155740_116165_27794DEE X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Update SMMUv3 to the modern iommu API (part 1/3)
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 15e305253ddbb3..92a72ec6ee974a 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2950,19 +2950,16 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev) static void arm_smmu_release_device(struct device *dev) { struct arm_smmu_master *master = dev_iommu_priv_get(dev); - struct arm_smmu_ste target; if (WARN_ON(arm_smmu_master_sva_enabled(master))) iopf_queue_remove_device(master->smmu->evtq.iopf, dev); /* Put the STE back to what arm_smmu_init_strtab() sets */ if (disable_bypass && !dev->iommu->require_direct) - arm_smmu_make_abort_ste(&target); + arm_smmu_attach_dev_blocked(&arm_smmu_blocked_domain, dev); else - arm_smmu_make_bypass_ste(&target); - arm_smmu_install_ste_for_dev(master, &target); + arm_smmu_attach_dev_identity(&arm_smmu_identity_domain, dev); - arm_smmu_detach_dev(master); arm_smmu_disable_pasid(master); arm_smmu_remove_master(master); if (master->cd_table.cdtab)