Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3144410rwo; Thu, 3 Aug 2023 23:21:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTm0521aeRXLZHxiUDwbm8Se2PYn4oYuiJTh1kR4okTvEkLzVNQzk+11VwMZTD8m77pWqV X-Received: by 2002:a05:620a:d83:b0:75d:5803:a20 with SMTP id q3-20020a05620a0d8300b0075d58030a20mr1209706qkl.68.1691130063362; Thu, 03 Aug 2023 23:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691130063; cv=none; d=google.com; s=arc-20160816; b=pffME1KYcdVXEWm20cdQm8JkoGrph+WQjLQxOnaNrfmhqoi8UaWrzulKRzymWqkTe/ fTlLSPz51xCLEwxBA1+Wut7RyAkuUwi7Awx3LpjcRzwnQAWNhgYdmDHiO3TH9O/clwsM aKDh4N3bTOdVP4biihDWoPaBMPMg9RbDPFCiP6dCNb2NlQvK7k/GphDbCiDOlx6agbSQ OZZimiXVofycBlpZqyq6xr+CkwQZe4qZ76ePkVVsSkDnGqWpjlmZuPG1z4Bv2JECCZCk /6mfTu2osJ9f7oOcoVFuoy86imkd4mhaBkqqTdn+xhKB1lGP2H534qW8tqXDJ4w7RBGc SP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=xa8qCPTzT4blCunO6r8ybHquGGtcNAp1viOdkFTCU1Y=; fh=lUKVdYiTv5UZoEavPARWrYLGgaq0Tzj7zaAZH6YskUw=; b=09CfKJkK4sSJkj8Wu3k7yIiBb3MJrPNP4638Tng+lUIg00NxzXA/nFxgBjDAXLTZFh hpd59HXVENYDSDT+T0qKED9ZJ43KzeeTVt8qoMn6G8CkokG8o83N4ed8Og6QEeyWwsD0 pxeCctLoMjJ99y+1FrTDEmO4vMGjEzmQfgdiWNLKzEybIMZbzE//sLCvi49omkrXxFzw UlHixkQeBiqMH37WtZOlc9ZywUtyeSzy29KprkY5r8GyjmaJufw7aF/Hx5OIYEYNtjsg B492aqnQX3Ebl5wbxZ0ji4jjxGXV8QAzz3mHqCAQXsRhrCZyf4NYNI6Qt5u5BR0dHyNp 2WKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VfNutGPS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y22-20020a63e256000000b00563dae86657si1245563pgj.479.2023.08.03.23.20.50; Thu, 03 Aug 2023 23:21:03 -0700 (PDT) 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=@intel.com header.s=Intel header.b=VfNutGPS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbjHDFiJ (ORCPT + 99 others); Fri, 4 Aug 2023 01:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232486AbjHDFh1 (ORCPT ); Fri, 4 Aug 2023 01:37:27 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDE2F1BF6; Thu, 3 Aug 2023 22:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691127430; x=1722663430; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=Z5zADW3+ohgukQOtaiiN0wnTwVTCNGNMYD2gY+atwEg=; b=VfNutGPSmmKCla7cojyHV3PUlQk4+3qAPtDAhpXwo6XHGBUSKOOvOVXu z8MvWBTCr6M4bf2gquhGUn81O1yKk7WCGDgq32iB504z8ynbuQsCzyX4d LwjkgTofqdpUmpmbuxZrU1KaAyJaBbHDwehfEbR4g78U3ZHKwdvS+G2sN LfrBDL3B+YScVnHC5bBlRHlc74nU7sSZtXdohniZXjgrEvKF8/7FXt3Sj SfLUaZ+0VrhU7Ac91QuN3+E2fjT34Xke69ginCJj4XqB4H9oBul9r9tbw GAiyK0Yxa2ZDh4CshnV3WIUglGQDp29ZHEs0HVWUGArU7TgeTWvxklBTd w==; X-IronPort-AV: E=McAfee;i="6600,9927,10791"; a="367533370" X-IronPort-AV: E=Sophos;i="6.01,254,1684825200"; d="scan'208";a="367533370" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2023 22:37:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10791"; a="764958817" X-IronPort-AV: E=Sophos;i="6.01,254,1684825200"; d="scan'208";a="764958817" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by orsmga001.jf.intel.com with ESMTP; 03 Aug 2023 22:37:04 -0700 Message-ID: <9ae1fc82-d4d9-7050-b66f-b15184dc0278@linux.intel.com> Date: Fri, 4 Aug 2023 13:34:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: baolu.lu@linux.intel.com, "Liu, Yi L" , Jacob Pan , "iommu@lists.linux.dev" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 06/12] iommu: Make dev->fault_param static Content-Language: en-US To: "Tian, Kevin" , Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Jean-Philippe Brucker , Nicolin Chen References: <20230727054837.147050-1-baolu.lu@linux.intel.com> <20230727054837.147050-7-baolu.lu@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 8/4/23 11:56 AM, Tian, Kevin wrote: >> From: Baolu Lu >> Sent: Friday, August 4, 2023 11:17 AM >> >> On 2023/8/3 16:08, Tian, Kevin wrote: >>>> From: Lu Baolu >>>> Sent: Thursday, July 27, 2023 1:49 PM >>>> >>>> >>>> mutex_init(¶m->lock); >>>> + param->fault_param = kzalloc(sizeof(*param->fault_param), >>>> GFP_KERNEL); >>>> + if (!param->fault_param) { >>>> + kfree(param); >>>> + return -ENOMEM; >>>> + } >>>> + mutex_init(¶m->fault_param->lock); >>>> + INIT_LIST_HEAD(¶m->fault_param->faults); >>> >>> let's also move 'partial' from struct iopf_device_param into struct >>> iommu_fault_param. That logic is not specific to sva. >>> >>> meanwhile probably iopf_device_param can be renamed to >>> iopf_sva_param since all the remaining fields are only used by >>> the sva handler. >>> >>> current naming (iommu_fault_param vs. iopf_device_param) is a >>> bit confusing when reading related code. >> >> My understanding is that iommu_fault_param is for all kinds of iommu >> faults. Currently they probably include recoverable IO page faults or >> unrecoverable DMA faults. >> >> While, iopf_device_param is for the recoverable IO page faults. I agree >> that this naming is not specific and even confusing. Perhaps renaming it >> to something like iommu_iopf_param? >> > > or just iopf_param. Okay. Best regards, baolu