From patchwork Mon Feb 6 12:19:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 53213 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2206329wrn; Mon, 6 Feb 2023 04:32:07 -0800 (PST) X-Google-Smtp-Source: AK7set/shAjRHynTCh73T3i3Aexr8Gjn6ItGK9X4Sbzd99sw5DduQQwMjIk8R+sIDRH6AJTLfulU X-Received: by 2002:a17:90b:1b0b:b0:229:b306:6dfa with SMTP id nu11-20020a17090b1b0b00b00229b3066dfamr21066650pjb.37.1675686726990; Mon, 06 Feb 2023 04:32:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675686726; cv=pass; d=google.com; s=arc-20160816; b=zYOmQSyHnZUx/MmBzC7B9xwc75yN3x5aGj3oJP/kb7POPoQC29vBBiGX59sg8EyhJc JO2rgZ9tMCYmcXlAMNAwhhg70nm5vteA2Ly59aAqa3Q8e18c0vyYjrwMnGjIdIAbBrnz AHB9QYmMNhu0cTBV219TjbnQJUhv+ij/JRuFUHkSfsXSFEDkXOv34zpbn6V6/TIn2mLt /nKgYlQPqI+Wjm7j/m7+Rg49wSBZK0Ge9NHBGKrydPRhntmHAij/XgUif/dQTslW0NQ0 MTSeIetATYPBHtacTAgL3zGGa2ISeEUsGZoyqIZ1s7BtpJd2v8F53telbXXvX0Lu0xH5 5AUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YO3VNNWM3bQJvY0yQ6/4vFDS411jRWvPlQ3nA847hrM=; b=0iQI4yXV18oZ/q5Mqfolidfa60EKhh2NfEczvdph6/gghlArhQsqyzNIBQ21Uahhu/ icQJGZmhxJTtbOnUxPym7pWcWSf+hBAM+q9O1Y8eO1Q1EBdzg2xh9tYeUQAcFAtvBZeY LL3h9DjOvYRUodHBGravQg7Ex6kaqLXiseAj48Hwh/S1buQ5B09PIKlsIHNbAeFAtbJy 14KmvHyPMS/gJrSMqXunZXNNzUGhNJNTvO+8NPlW68LpxrE3XdUE8gD3ZPo3Uozu59fT 542bthC12i86oG3JTIfvQ6G8z8eUIF7Mcr3znSIoRf4UtHA9GCwaQFkqIL8hoqlEkRne 9l7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=t0hcTL7M; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a17090a8b0d00b00230928f99a0si6903505pjn.141.2023.02.06.04.31.53; Mon, 06 Feb 2023 04:32:06 -0800 (PST) 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; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=t0hcTL7M; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjBFMUS (ORCPT + 99 others); Mon, 6 Feb 2023 07:20:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbjBFMUQ (ORCPT ); Mon, 6 Feb 2023 07:20:16 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2054.outbound.protection.outlook.com [40.107.223.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42723DBF4 for ; Mon, 6 Feb 2023 04:20:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LcvlfYdI4HYb1xchLzuuMZ43BfTC1ZufVMwe4OF8QhfsRbtgVJF+2aqB7YEfFByxBf2afDivgy2ZRERS6le3ZcMAyP86JF7XEHq6Ueoq7xr7Tk4Mylh6ijH6fnsFfLcrUfbJiYCaznksivTfsHymXFg7zlI7GjhUQOJ5PNFqN7RCZ7I0ZukGnyIpECGDCbdw54mgwHC/26BIZmoO2dEZFwVPf/jvMrT56MmleyeoozfC6pLkJA1DSlPPl2Qt60A6fMNRcL1C+L9wtNbsBZDPoeiTyxsRIWI/ocKEtd3Vq60svTidaS+nvFg4VD0+bRLf3lWX49mevdY4uahQgHdfhw== 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=YO3VNNWM3bQJvY0yQ6/4vFDS411jRWvPlQ3nA847hrM=; b=hHPPcjADj5QMbyknmW8dBszZzyPE80z2bKLHy2ZeS/9IEMnmqmeZIrrmRFyd1eI5WBlxXd4aKFLlKpoFWL/oAkwGkZ5Ufl4MYErYUKUgGCgaR1Ja/3SIjWYLfOE+hsn4fFeazlfzE0s4glhSLl2QAzeluVg8Us2Qf5Y+Idm57l+ONSsLtqjqDwQDU6DWZ7tgV/dzqrp60tp0GLOMvp7Xj8Saz/Nw1y5VYPPGKa/ve9+MoxnBAtmet8Bte8ratXjACIo0A2aOB/k1WhMVJv5xwctsn4revM8Ny8MOu6cZYAZubC1wEwrywO2OgodoLrjNd8xz4xSBDFZEDGCm8ATvzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com 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 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=YO3VNNWM3bQJvY0yQ6/4vFDS411jRWvPlQ3nA847hrM=; b=t0hcTL7Mjx9DGBsuKA0aNdEM4s50ezJVeJETjTwLMrxwNShtylz3lxdG1uuHuwafqjxOyzwjd6v7bMDLn0RboEdlkJ+p/3YWRoThiNA2qM70cgeSK4KD64YPR9x0fiZo58Wg8Kvyd6MpouyNQAAXFJjtZUF3b3Q43xGN7tcKRUYohDjWyWDm5NMWfK313K8nKE8vDj1PuWoQg0jyNlyTp9VnI7qZhTGi/wroXzl0mda7ffvI+S4WmAHMRRoGbb5xRa9QDsXrPQJ0XpIQB0GWrp9Sx9PpQ0vrK/QZAojTV6EF/D6t0AEf2bSPgkQuOSniw72nBkxjEwJ68BnLh6cT/w== Received: from DM6PR07CA0115.namprd07.prod.outlook.com (2603:10b6:5:330::6) by IA1PR12MB6282.namprd12.prod.outlook.com (2603:10b6:208:3e6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 12:20:12 +0000 Received: from DS1PEPF0000E656.namprd02.prod.outlook.com (2603:10b6:5:330:cafe::2) by DM6PR07CA0115.outlook.office365.com (2603:10b6:5:330::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 12:20:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0000E656.mail.protection.outlook.com (10.167.18.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.21 via Frontend Transport; Mon, 6 Feb 2023 12:20:12 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 6 Feb 2023 04:20:04 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 6 Feb 2023 04:20:04 -0800 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Mon, 6 Feb 2023 04:20:02 -0800 From: Eli Cohen To: , , , , , CC: Eli Cohen Subject: [PATCH 1/2] vdpa/mlx5: Don't clear mr struct on destroy MR Date: Mon, 6 Feb 2023 14:19:56 +0200 Message-ID: <20230206121956.1149356-1-elic@nvidia.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E656:EE_|IA1PR12MB6282:EE_ X-MS-Office365-Filtering-Correlation-Id: e7eac2d3-5007-4461-d6ab-08db083c7efe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AuUhWijXEBkE2u94UE7AiridNdTNQJTL6DPBvXvS2neVbv2TPkfO8bz2obQgLmBS2ng7ewDU0PiKEgr4P5b56qykxJXDonvPGTSPyL80FXfqDbWW6A793wtaxZVqHsZ+tdkrvmO4B3p8HarnkJdcIEaVunMYTNVzHVcmpW/P2nzHtwfiGFA9gWavSmUKbia0i8s0EFEG5OVf2YdQs0LvN3JveySgxWHtRxt1HcA65jj0FXOcGu6GVDmoPajnuSSHDqY4Z8Fqxq8rz0Qy/xHEyTpoUV7jQaRY7L48YJ1eB1sTRhO1HB1HIHfr4bBybW+9J0THh+BBKUuni1dAvtS536NQRIARVcr4KwjRYDZpcfiHxtB0jGOj9V9kb+baqarb6M94vMSH9yqSvr6Jn0hu4kmVbmSJlfuxGL6oKX9UFeqeREuUdcG+RZO93LBuXrElWjV57ltMoy96OKSKotwkvlIujtKp3+5H1zSd70vpxgJDZvlqVHTQFBg5bHw1B9h846mlz8bIns92XptMXJSNKdMo51u51/CSXeGbry+/Qtd+yEOYhuxlB2nhIHhwbjgb2l1esclQamgrufnlKlap9fYbi0dbKezKDnGT5XPwnZrdX2DaDWFoKJV29bGAwCS+lFzhyl39m+eOyAtm1nbCYXX/22xqJiuINF112XnNs5p+NdiW2coT2xXmZ2EMpi58CS96aja6+AIcrwq3C+WcWw== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230025)(4636009)(346002)(136003)(39860400002)(376002)(396003)(451199018)(40470700004)(46966006)(36840700001)(82310400005)(40460700003)(1076003)(6666004)(40480700001)(107886003)(478600001)(2616005)(8676002)(186003)(26005)(4326008)(70586007)(70206006)(316002)(110136005)(7696005)(36756003)(82740400003)(7636003)(356005)(86362001)(426003)(47076005)(83380400001)(36860700001)(336012)(5660300002)(4744005)(41300700001)(8936002)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 12:20:12.3184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7eac2d3-5007-4461-d6ab-08db083c7efe 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.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E656.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6282 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757084885199763384?= X-GMAIL-MSGID: =?utf-8?q?1757084885199763384?= Clearing the mr struct erases the lock owner and causes warnings to be emitted. It is not required to clear the mr so remove the memset call. Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/core/mr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c index 0a1e0b0dc37e..03e543229791 100644 --- a/drivers/vdpa/mlx5/core/mr.c +++ b/drivers/vdpa/mlx5/core/mr.c @@ -503,7 +503,6 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) else destroy_dma_mr(mvdev, mr); - memset(mr, 0, sizeof(*mr)); mr->initialized = false; out: mutex_unlock(&mr->mkey_mtx); From patchwork Mon Feb 6 12:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 53212 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2206295wrn; Mon, 6 Feb 2023 04:32:05 -0800 (PST) X-Google-Smtp-Source: AK7set80uB1QyhYt5jZdZJCwgGOhfZq8Aagh7uggX1XZ6L+rTVKy3hPrC+M76QEUudXBL359Z6mU X-Received: by 2002:a17:902:e291:b0:198:fb56:1a0a with SMTP id o17-20020a170902e29100b00198fb561a0amr5157570plc.34.1675686724823; Mon, 06 Feb 2023 04:32:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675686724; cv=pass; d=google.com; s=arc-20160816; b=Txdyt1S7IEQ0lJOCKgMbG3tdzwdOKMzuB7aKz351OOh+Sf5d5r8RPWmKmdZBWxDGhJ jiPPYJaez2r4KI/Q5QMLV+ycmvNscQFkR0dPRhGHU1U0iTx1gUrZY7gJUQvdCMRIDfUl d6pU3BDc1WzJv+h+Vntsrc4bsu/xe2Dsy2INpgUMnbrbt74hJ82K7h0Mzh37Qf9fIzo1 oIkSWGjmse4XPMj1u4LlLckBKQQ1bmWZI5XUNHfC+t5qncRLLj+ZZ2VRxVVxRXn1Stq6 fX7fuMij/H/hzLOonFdvjs+1xfXbj4GEkJ8gE35Vf9pmNYJqPvgPzELQTvrgLVWEhIKq 5KbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5VTlV03hzFplTZ9YXLs83O1QyBD+mgb9BcFDFcZAQmE=; b=ubDXorpRS51XXoYDAS712TFvUe+KLxOPwGZCwt3y6Btr/oiczfo/viVCMz+O377VST yfnbMHdjUsej8aGaq3db4u8Ya6MOmGPDbfpcvdGx/mBol+S4MPQsmLQAsHBagxcjbZP2 FIAedP/XCSHvDF+jiGfU39y+B68Sn+sP4PiHFaFjMFSEAxZJhjdl5urMv/Ml8e+ch5Oe N/UVgQZv8I6haTyie2atyGVjxL+HIQuOxqX7CC/XOxcNwYxXFloLrTrixi+TXxdJeyH4 2FvEFFf5R3HKXUjE10rrOxf5BEp1Bz+OPn5uqHGPLUKs+P+gsNkmBEq/l+BB1QDIxnzh 46Fw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=pv7aA67+; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a170903228400b0018c35376fdcsi12029950plh.78.2023.02.06.04.31.51; Mon, 06 Feb 2023 04:32:04 -0800 (PST) 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; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=pv7aA67+; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbjBFMUh (ORCPT + 99 others); Mon, 6 Feb 2023 07:20:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjBFMUf (ORCPT ); Mon, 6 Feb 2023 07:20:35 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16E7A1CAF1 for ; Mon, 6 Feb 2023 04:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dlUd8AGFGr+yn8VDTlbpFS2FFdJvw1xgSBisYLStM2udAAUw2jTAuKOcYgLidRO339H0cH35Vs3qG7ciq7MVzx118TdiH1sNoXR8LtobsePYtG2Q2gxFSfnzGP05ODQ0TFqBoCRs0nvz8nQrqz8jQgfIvTYzIlfyRf4R2KIaWnGHHM/APnjApbqLZEDYkkyPc70g5rUPvpSnRofRvjnJW1zyt1smRoku5lJxOp1OUY99sb+z230GtYbU97bQJ62BnNJ9umWkyh8hv3Dqe1Bs11s95L2fIAe4cUA3tNH+AZTpkFMoszkTd8x1USzVc+OuiiPBTAbWC9ozamBcdb0YGg== 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=5VTlV03hzFplTZ9YXLs83O1QyBD+mgb9BcFDFcZAQmE=; b=oUHooqnDs2eisCKSru1b1RB0zduISoJT4UNAWvMCG9Wns5QNDdhAIuEkqorzRdq3o+9gE6wSu1WrzAsuTMrjhNhFOZuNJM4Nojh4RhfIh+4rKF0m6fflXnPzKYN0BiXEq3mB+0ImpcZVK4kEnPT/+9UKlfPdLXX8zk6jC4cL2Yetns/wkxFDk6DTstplqetL20PgkNb2hM1q8QHXhgacVyR59Mq3Hz0wlZ3NLM7Ld/Uwj4HHfTk4c6YtyIsR4dSya6IPIcGzGQfRd8L/coRVVo0ZNri3K3fvpJvoMUvz/EC7ZES2Txy/FfYUFw3dUyQm/KxO14ECknYN/4sjhYDFQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=redhat.com 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 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=5VTlV03hzFplTZ9YXLs83O1QyBD+mgb9BcFDFcZAQmE=; b=pv7aA67+ISsk6pqv+zIm1ieg09GdH8sKgfmvucXBZ77jeFWa9QMi4hyHgKaJ/6Vf3YKA276P8j612lT+KvRlvce/3jpF0FEdjMeZv4gWMb7mbIPloE7ZtxTerwvsTm7mK4S9lfZ701NdJUnY5x/v2FAWajw/re4RVnnJBZiyI0jXy1pPoTiebO7JBf8uVvjZaC92BNDLXNGcosmypuv6JOhJUNqRTPgA79imVX/jaNZWtsNpJNEf1/A+jDUToTz9gYBVL5pe3y0nqKxpbOfAOYkVEUh55DMql290EP4npacbGvIzZT9MdwGzy4ISmAeQrkINxfdzn2g2K2EMpjXDxw== Received: from DM6PR02CA0061.namprd02.prod.outlook.com (2603:10b6:5:177::38) by DM4PR12MB5376.namprd12.prod.outlook.com (2603:10b6:5:39f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Mon, 6 Feb 2023 12:20:28 +0000 Received: from DM6NAM11FT076.eop-nam11.prod.protection.outlook.com (2603:10b6:5:177:cafe::5b) by DM6PR02CA0061.outlook.office365.com (2603:10b6:5:177::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 12:20:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT076.mail.protection.outlook.com (10.13.173.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 12:20:28 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 6 Feb 2023 04:20:21 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 6 Feb 2023 04:20:20 -0800 Received: from vdi.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Mon, 6 Feb 2023 04:20:19 -0800 From: Eli Cohen To: , , , , , CC: Eli Cohen Subject: [PATCH 2/2] vdpa/mlx5: Initialize CVQ iotlb spinlock Date: Mon, 6 Feb 2023 14:20:16 +0200 Message-ID: <20230206122016.1149373-1-elic@nvidia.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT076:EE_|DM4PR12MB5376:EE_ X-MS-Office365-Filtering-Correlation-Id: 58118883-850d-42cb-477c-08db083c8887 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7RioFyKBVdKsKYK9agGEsjB+yelhZemoTTBLSIdq6hnWdbpq83u40dZ5UEWX3woIuOWEKLbPGkvYwiNgdm7N/MAnOXvmH9d1DPi7GX1d1gpGSJvpVEbZfZNkT9BxS7Ff1Lr4xqkQdZ0CTz+BOeLhguH1R6y9NSXezM4bhe9PNE7c8qYU8rDh7IviNloP47u0OGr6VVGyCM26VI5/tfRpENcEto++Isl+jJUpAw1bNAiCDXjjke6v/dnDNL5yUP3hfQuekRkc6cikRc6q9JONw6qsbnb9w1A6V5qsqakEGz+pAMGPqQ3BYkZz6tcZkS/AyGZrJgRrvCPlIwvHr6BQlYkZS5p35yGRYBeOjCy9x8c58JUxPF+bxWdj0y4ZlAT5bPIHNnq7oMnGElpz8aQmy9Pdjc8KYtHNFdZMefd0/CvMbQJ+Nm1FPJI5umpfyL8HjZGv+T9gZgV5N1QAlXLrPxBG1ew3+AFTq8LNEuYg99OBs3dZHTHORBgpNw4BbsPKCDhrkXikDUxM40b5DRjPQsrdSkH/mSEeaup+BwtOxWYmCBGw0yhix3lK4b9W2tbssfpveXbafuTEKe5Vr7uMvZpsvTvfUhx8gO+y817gJsxz/xeC27pyR4PrFy1+62mvz9/xFEP08cw0BXJrwU1ObVArIe6zxsDjmK2h5BUXddjfzDMZs7Z/Nev59UuMLyBEasFUPAnksAudvacMvSXXtw== X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230025)(4636009)(396003)(346002)(136003)(376002)(39860400002)(451199018)(36840700001)(46966006)(40470700004)(110136005)(82740400003)(107886003)(86362001)(7636003)(1076003)(356005)(40460700003)(4744005)(186003)(26005)(2616005)(82310400005)(316002)(2906002)(6666004)(5660300002)(36756003)(40480700001)(70206006)(47076005)(426003)(7696005)(83380400001)(478600001)(336012)(8676002)(8936002)(70586007)(41300700001)(36860700001)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 12:20:28.3121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58118883-850d-42cb-477c-08db083c8887 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT076.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5376 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757084883097854978?= X-GMAIL-MSGID: =?utf-8?q?1757084883097854978?= Initialize itolb spinlock. Fixes: 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting") Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/core/resources.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c index 45ad41287a31..d5a59c9035fb 100644 --- a/drivers/vdpa/mlx5/core/resources.c +++ b/drivers/vdpa/mlx5/core/resources.c @@ -233,6 +233,7 @@ static int init_ctrl_vq(struct mlx5_vdpa_dev *mvdev) if (!mvdev->cvq.iotlb) return -ENOMEM; + spin_lock_init(&mvdev->cvq.iommu_lock); vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock); return 0;