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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCC66C61DA4 for ; Thu, 9 Feb 2023 17:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbjBIRjy (ORCPT ); Thu, 9 Feb 2023 12:39:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjBIRjy (ORCPT ); Thu, 9 Feb 2023 12:39:54 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F7175B744; Thu, 9 Feb 2023 09:39:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675964393; x=1707500393; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+cpCRNK3m2eAdE04EZsrrPRCT4Hr8oF27Jp5Ga1PTms=; b=nPSGjB0BxA1HKgLlSF0Xzm7P6994YEs6mMt5OleTOVV+anL0HDsL5065 I21yqKgAetu/AIilSuUpCAxiZHiD0290N3jsPBLIpShNWyn0tPoNV9Sgf 973zRczxu9/H71I/imIKbgKT6E1B+kVB2IOOO7i7gD8+AISw8cbvhIRxS jGPfjApb5ugT7n7FoB4Honxq8qkubtRoTIRacfcZrDD9a6qUnh0166pkf 3GbCJIqko4RkBrliVubBC/4SSa7A5aX3ctCWlNfVnas+veVwluosRSNCF sOxt3dLZRxTNm7Ewei8XmJ0PPQIfCE6VIG//O+6AwXTSad40OKgXt9MYs w==; X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="328821815" X-IronPort-AV: E=Sophos;i="5.97,284,1669104000"; d="scan'208";a="328821815" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 09:39:52 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10616"; a="736439370" X-IronPort-AV: E=Sophos;i="5.97,284,1669104000"; d="scan'208";a="736439370" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.24.100.114]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 09:39:52 -0800 Date: Thu, 9 Feb 2023 09:43:30 -0800 From: Jacob Pan To: "Tian, Kevin" Cc: LKML , "iommu@lists.linux.dev" , Lu Baolu , Joerg Roedel , David Woodhouse , "Raj, Ashok" , "Liu, Yi L" , "Ghorai, Sukumar" , "stable@vger.kernel.org" , Robin Murphy , "Kumar, Sanjay K" , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v2] iommu/vt-d: Avoid superfluous IOTLB tracking in lazy mode Message-ID: <20230209094330.12a94139@jacob-builder> In-Reply-To: References: <20230208181834.1601211-1-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi Kevin, On Thu, 9 Feb 2023 02:09:47 +0000, "Tian, Kevin" wrote: > > From: Jacob Pan > > Sent: Thursday, February 9, 2023 2:19 AM > > > > - iommu_iotlb_gather_add_page(domain, gather, iova, size); > > + /* > > + * We do not use page-selective IOTLB invalidation in flush > > queue, > > + * There is no need to track page and sync iotlb. > > Domain-selective or > > "in flush queue, so there is ..." > > > + * PASID-selective validation are used in the flush queue. > > the last sentence can be removed. same meaning as the first one. > sounds good. > > + */ > > + if (!iommu_iotlb_gather_queued(gather)) > > + iommu_iotlb_gather_add_page(domain, gather, iova, > > size); > > Reviewed-by: Kevin Tian > Thanks, Jacob