From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 684E064A for ; Thu, 9 Feb 2023 17:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675962231; x=1707498231; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h7haSo2PuF074xBqzWO5BEhw94RzyZrripHwKnABad4=; b=ZdrhEP8ksWGpFyFx6JC364CapZ0Nr3Y6Ess//KyzKUpavtbBr2f9DBBx btlT+x6wmJNIHBqDdvJhXJUp1PVWm3fs0ln0eSuxogSf1VES2YfVsMDbR plzGxV1xjb34SIhC05qOx1cL+pKM/lSWei0+Z76Xgyd4rseWGmgDePrC8 0W7oPczuq/ySoe4vnbW7XF/1eWaGl+DDqjqfqauWnbCqx1JH6shZ0UeIj vJ4Rv+58BZK/lW7Zd8bwSpu9WTGU9Gjl+BP93rtnf/5uCZRZoNsWquRbW sCl+gkD7SKjtqIek6HnnMga9VOEvplZEo+apO4TB8MiyTIuh/HhryUHkW g==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="327857625" X-IronPort-AV: E=Sophos;i="5.97,284,1669104000"; d="scan'208";a="327857625" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 09:02:26 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="841718905" X-IronPort-AV: E=Sophos;i="5.97,284,1669104000"; d="scan'208";a="841718905" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.24.100.114]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 09:02:26 -0800 Date: Thu, 9 Feb 2023 09:06:03 -0800 From: Jacob Pan To: "Tian, Kevin" Cc: LKML , "iommu@lists.linux.dev" , Lu Baolu , Joerg Roedel , David Woodhouse , "Raj, Ashok" , "Liu, Yi L" , "stable@vger.kernel.org" , "Ghorai, Sukumar" , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v3] iommu/vt-d: Fix PASID directory pointer coherency Message-ID: <20230209090603.37854cb9@jacob-builder> In-Reply-To: References: <20230208171902.1580104-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) Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Kevin, On Thu, 9 Feb 2023 02:08:23 +0000, "Tian, Kevin" wrote: > > @@ -1976,6 +1976,8 @@ static int domain_context_mapping_one(struct > > dmar_domain *domain, > > pds = context_get_sm_pds(table); > > context->lo = (u64)virt_to_phys(table->table) | > > context_pdts(pds); > > + if (!ecap_coherent(iommu->ecap)) > > + clflush_cache_range(table->table, > > sizeof(u64)); > > this is not required if cache is already flushed when the table is > allocated. yes you're right. Thanks, Jacob