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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 82C2AC433E0 for ; Thu, 4 Mar 2021 12:28:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F47764F11 for ; Thu, 4 Mar 2021 12:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240481AbhCDM13 (ORCPT ); Thu, 4 Mar 2021 07:27:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240478AbhCDM1G (ORCPT ); Thu, 4 Mar 2021 07:27:06 -0500 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ED27C061574 for ; Thu, 4 Mar 2021 04:26:26 -0800 (PST) Received: by theia.8bytes.org (Postfix, from userid 1000) id BA31A447; Thu, 4 Mar 2021 13:26:24 +0100 (CET) Date: Thu, 4 Mar 2021 13:26:23 +0100 From: Joerg Roedel To: Lu Baolu Cc: Will Deacon , ashok.raj@intel.com, kevin.tian@intel.com, jacob.jun.pan@intel.com, yi.l.liu@intel.com, sanjay.k.kumar@intel.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries Message-ID: <20210304122623.GD26414@8bytes.org> References: <20210225062654.2864322-1-baolu.lu@linux.intel.com> <20210225062654.2864322-3-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225062654.2864322-3-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 Thu, Feb 25, 2021 at 02:26:51PM +0800, Lu Baolu wrote: > When the first level page table is used for IOVA translation, it only > supports Read-Only and Read-Write permissions. The Write-Only permission > is not supported as the PRESENT bit (implying Read permission) should > always set. When using second level, we still give separate permissions > that allows WriteOnly which seems inconsistent and awkward. There is no > use case we can think off, hence remove that configuration to make it > consistent. No use-case for WriteOnly mappings? How about DMA_FROM_DEVICE mappings?