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 X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8F24C433E0 for ; Thu, 28 Jan 2021 10:35:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64AB064DCE for ; Thu, 28 Jan 2021 10:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231470AbhA1KfR (ORCPT ); Thu, 28 Jan 2021 05:35:17 -0500 Received: from 8bytes.org ([81.169.241.247]:53294 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbhA1KfO (ORCPT ); Thu, 28 Jan 2021 05:35:14 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 7492351D; Thu, 28 Jan 2021 11:34:32 +0100 (CET) Date: Thu, 28 Jan 2021 11:34:31 +0100 From: Joerg Roedel To: Lu Baolu Cc: Will Deacon , Ashok Raj , Jacob Pan , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] iommu/vt-d: Preset Access/Dirty bits for IOVA over FL Message-ID: <20210128103430.GI32671@8bytes.org> References: <20210115004202.953965-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210115004202.953965-1-baolu.lu@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 08:42:02AM +0800, Lu Baolu wrote: > The Access/Dirty bits in the first level page table entry will be set > whenever a page table entry was used for address translation or write > permission was successfully translated. This is always true when using > the first-level page table for kernel IOVA. Instead of wasting hardware > cycles to update the certain bits, it's better to set them up at the > beginning. > > Suggested-by: Ashok Raj > Signed-off-by: Lu Baolu > --- > drivers/iommu/intel/iommu.c | 14 ++++++++++++-- > include/linux/intel-iommu.h | 2 ++ > 2 files changed, 14 insertions(+), 2 deletions(-) Applied, thanks.