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 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 C5FF3C4345F for ; Thu, 2 May 2024 19:27:28 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7c0YXUX0kvuAzwMPGlEeyt1lKmcLp7tnIXl06GRKMC0=; b=mfaC1NYWZme6v2 Nke3PS5uH1MNv1snUuahfw2sA2MEny1OveNSsoIUnWIS2XFrMLHDbH+eOQCiSPPGca8l2r95o2kvP +BG6GXYwLyeJ/78DZeyVtkjSXXMBTSszlmGMkvr3tIvLdJ9GFnD4q5ogD/EIkvEOb4+Vi+7YcOi3z 5cPh7nI9TLBt7bcueXO8XeTzeBgdGT6146bnlVsUNs2HA/koIvRKbX0rZUqctG3uPw7L5AS5/CdPM SKtCOKoh66L7d+upAs6WugAPwNDQXAc7JhKwKPmkVTv6VnKpCcgsndCr2PKobaG9akLsQzs9x8pRK ac0suC4ksXe/OPADOp8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2c5J-0000000Dizp-0siF; Thu, 02 May 2024 19:27:13 +0000 Received: from mail-mw2nam10on20600.outbound.protection.outlook.com ([2a01:111:f403:2412::600] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2c5F-0000000Div5-2hDT for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 19:27:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YW/g/m+/4mceI5tsmTBEYprJTgH3ednwFN/nXbI93ypCFnCiVy5EV2gQegTyCsmAO5KEBHK/HmZn0X3orQxLupRl/CK6qXrtDEz+YC5s+gqQnNRkQPdXONqLP04DSQk4TfedunapmJE655kYmG+R5Q6qwriW0lUlCFj25u2mrhT78SPXuCqk7UtUXIa6mWImkKylOjfgZBOkS2tKh95l0g1PtTCCjcwwSOgmohITskxHXQv8S7Su6hHuN42+5TMXswyMVD4HyG4Bg9Ah6JXV/Oxb/elQ63dR45HMJgqqeopqRVdWwDW2cdK/lRMjqdu5ALU3zut3eROO8cRUvJgBow== 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=pZlAZQJW4ViXUV7ZL4h5lYMjH4eipfjBIhhWPYQ/Vc0=; b=lu1cAldMaGCbjJ3xMbZTnIhnti4BH51soE3eA+f8DRdnGPbcIOIyFCvdzRhAOkZc2FDVaKbiI2UyreyCDFp5MYD+5q8nhg7qY1NpW2BucjaHEWfNw1aMoJDxTRKnAzPtfOm9qRV/D5uCa0fOzDzSp9zKptTfGWMbKDrq0YuXW2wfUTo21IHzYSAwNtvMU0XJmms8U8xkKkwIaeWVtZWmBW81qteS0wx7JGwm+eKuUzmwUDUdpmk9uqe4wQTmhGsAA5Hec8OB+lD2h09TdrQQlK+y1KP1cjM8cMHaWecbiBsL/mqBUp+lVEeiqolAWSmVKN+qOC4nn1LJHT7IHCCsUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=pZlAZQJW4ViXUV7ZL4h5lYMjH4eipfjBIhhWPYQ/Vc0=; b=l3WESkyiHe5AadCdumE2jolmidg1x0JsychYjoXisbYcAlbj4cXmx/G26DiHdR2qb7hB0GRaI52HxxQY02RfXnPZrddI6EtKTStKf8WnZ+mtn+pjpr9DCjTTT0RpUAmdlmADyL+ZRxlClrpFrqqAEvFVhb3Opijo9LKxUJNwt6NktKX37Uj5rddKbcsbV0uwkUvawBufLDEEEwTaVD2MMr8d8PNhtFUB3hNo5ECXX6j8fKHCgLY2NRZYqzjJSbiulplLqXRcG+13jAaKSxLr4J30hGQ3AiEPGgdKRPl77oYh2axp+HOgBCJse7Q2whQ/7PiyI/NUSAyBKUdusWwJLw== Received: from CH0P221CA0030.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11d::18) by SJ0PR12MB7007.namprd12.prod.outlook.com (2603:10b6:a03:486::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Thu, 2 May 2024 19:26:48 +0000 Received: from DS3PEPF000099D7.namprd04.prod.outlook.com (2603:10b6:610:11d:cafe::90) by CH0P221CA0030.outlook.office365.com (2603:10b6:610:11d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.30 via Frontend Transport; Thu, 2 May 2024 19:26:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF000099D7.mail.protection.outlook.com (10.167.17.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.18 via Frontend Transport; Thu, 2 May 2024 19:26:47 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 2 May 2024 12:26:28 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 2 May 2024 12:26:28 -0700 Received: from Asurada-Nvidia (10.127.8.12) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Thu, 2 May 2024 12:26:27 -0700 Date: Thu, 2 May 2024 12:26:26 -0700 From: Nicolin Chen To: Jason Gunthorpe CC: , , , , , , , , , Subject: Re: [PATCH v6 5/6] iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV Message-ID: References: <63414546b1eafdf8032ac1b95ea514da6d206d63.1714451595.git.nicolinc@nvidia.com> <20240430163545.GS941030@nvidia.com> <20240501130042.GC941030@nvidia.com> <20240502124103.GA3341011@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240502124103.GA3341011@nvidia.com> X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D7:EE_|SJ0PR12MB7007:EE_ X-MS-Office365-Filtering-Correlation-Id: bd8995e8-eebc-4bbb-c106-08dc6addcf14 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4fOi2EdwrINQiVhBTg4XIjV5q1rsOR53MwDX6oNv5sG/9GKvPj9kEEJNb0f9?= =?us-ascii?Q?Ri0PpTpvKPaC0nJ6gzN8vDzdbX9Z0gzK77rQycl5U74a5qto4qUv9yTakX4H?= =?us-ascii?Q?fjwDTEnyYdLR5DAiWBXmG1YRkFYr/EUPwiJZE2EH68/vo2ezUoeCDIUY9F0z?= =?us-ascii?Q?DtzzGrRr6UZZVeMh5s8bRMT+B+ACyDvQqMSN2DqrZgKaMqV/opBsl155Ncay?= =?us-ascii?Q?uvv65mPzi5jnyUlQYUHqbulXCEkp8pZsXitkZj+kX/Jy78dLzHPdWJEtxb2S?= =?us-ascii?Q?aOWZPm6mj4E9CxcRO1CylWzDp0EAZKuANiaKK94fsZuVX7Yqb3pDn45Omt7j?= =?us-ascii?Q?VA9KYpK2TxK0pLCtcxXsMEz2x87gDrPdFp/IqeSrfpAGawFMSF7PXNEcPkYk?= =?us-ascii?Q?A1ikEdlR7uVx9vf/an0n/5PrSPjR6GEoN61dd2qpMxuvP/sTyG87sXFdCvUw?= =?us-ascii?Q?HD+YkKCY8Q5ummLXxP3NtjuuSml4BBb+vrvvNtN/VOBEDx0IzTA9A7rok1Fy?= =?us-ascii?Q?VtNLp7KfkBUbXWQe1zcK17IbqlFCdQ/mrcY3njdzAE+hbXpr6EhCVF7t298X?= =?us-ascii?Q?82abIP5IU+fVFzLhOpwnb6u/46g0qpzLuU4ORxF2UK6yL/dOQhjs/ujLAEG/?= =?us-ascii?Q?/iN6eqbickN7eukntAgHJItzPDpEhsJeR/JuH1R3n/RLacjTlDW9ymt+fk1a?= =?us-ascii?Q?MYpZJUkDJPNVQuTl69s5I8un74pbZY2C63oDTbLQUu8Skq9tY0qZEa/8dxGi?= =?us-ascii?Q?tBM+OPj6N1TlHzxgff1jjeuuV9ELXe8sGPh/iiGTh7OcdhUf8V6yDqla0LfP?= =?us-ascii?Q?sn9qW7SL/ii68lPdK5u3kt4M8Wlu9QbJFdZKThNCkTYGFnS2HMUO5PSeANt4?= =?us-ascii?Q?Ej3/LzQ7zBFr0iOFo3TsRtOggs61pVWud7mrjEUF1+hnLJTspQih28sIf/uU?= =?us-ascii?Q?W9dAbiejSlmWv/J/BdKlIUkYE/6h8eDDUk8MuHv8XdXA/R3pHPCv8BZiQf16?= =?us-ascii?Q?xEHZbou87gtYyYaNMJCH5ov7+BHKWIjY6RL8GzZj1IE9uIi4a09hVnXreaU6?= =?us-ascii?Q?QkFRuQI0XUvlnZ7yUB7Zan9mwNxVkoPaRx6GjnqaJtaHe6O31qx4sOzLXHHB?= =?us-ascii?Q?gF1CGuHzvU27gweXyLQFj1eym0/HsXi0f3Lht+JuSqzG/k5e9PcytOHSNtQU?= =?us-ascii?Q?2ji5Jz0crMcvqSFFhGo14Dz8+T/g0jBIY4sY86TNAAmMWHtmSa6VW/fk1eHT?= =?us-ascii?Q?d1sAYsfRx4QFmV7ar4H+Lyvq6Hbgr7597ZFg0hrzDQyw5BLsYJDYgnFtJ0sj?= =?us-ascii?Q?v/oFAC3JGcJZhMltNL/mLizYM3ZgCc0ealsnZAWfr/8px1i7eCwqJhaMXhfr?= =?us-ascii?Q?+ISXYs0=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(1800799015)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 19:26:47.2453 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd8995e8-eebc-4bbb-c106-08dc6addcf14 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D7.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7007 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_122709_707832_EB3747EB X-CRM114-Status: GOOD ( 26.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 02, 2024 at 09:41:03AM -0300, Jason Gunthorpe wrote: > On Wed, May 01, 2024 at 10:43:39AM -0700, Nicolin Chen wrote: > > > It doesn't fix any real race, I'm not sure what this is supposed to be > > > doing. The cmdq becomes broken and you get an ISR, so before the ISR > > > it will still post but get stuck, during the ISR it will avoid > > > posting, and after it will go back to posting? > > > > > > Why? Just always post to the Q and let the ISR fix it? > > > > Yes, we could do so. I was thinking of the worst case by giving > > the guest OS a chance to continue (though in a slower mode), if > > something unrecoverable happens to the VINTF/VCMDQ part. > > Does that happn? The stuck vcmdq will have stuck entries on it no > matter what, can we actually fully recover from that? Ie re-issue the > commands on another queue? Well, the handle_vintf0_error() should fix that and recover. And rethinking about this, if this happens it's likely a SW bug that we shouldn't ignore. With that being said, the viommu infrastructure still needs an irq forwarding that is currently missing. I'd need to draft something likely on top of Baolu's work. > > > So just don't use it. There is no value if the places where it should > > > work automatically are not functioning. > > > > I thought devm could work when rmmod too, not only when the probe > > fails.. > > It is limited to cases when the probing driver of the passed struct > device unbinds, including probe failure. OK. I'll drop all devm_ and add tegra241_cmdqv_device_remove() instead. Thanks Nicolin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel