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 8776AC433F5 for ; Fri, 6 May 2022 05:31:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389221AbiEFFem (ORCPT ); Fri, 6 May 2022 01:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389211AbiEFFeV (ORCPT ); Fri, 6 May 2022 01:34:21 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1586A220F5 for ; Thu, 5 May 2022 22:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651815040; x=1683351040; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xo3GNZdRcwK9ipt9zUqLqMqh1EBzTdvgrneTIVh8+9g=; b=MxHcIQZBPkvMugkBvPg8zjDxXej9pjGsI2aM13DfY0WTN7Uk0L739ZXN Lg2GgpUHqMGkWXNnL0duUb9dLw+Z+0HHZcv5dqEuym/PF7EtkE2y2TP+b v5wxsBg5uN+ln5JWYqTAM7z6l/AT7SJxTMU/emWJ8YZvHZ6jx9QEQhSSX qW37qbxLDh3gScLdWLcGgv3NKoZ9SSite+Rrg/IlGxxx+Gg/uj1gr0tVy mpNDuGdCgQZCHn0JQ98zhX7zsoTAitwghn4o9kxgrHKfBQsoKopCmGI+W 8PpttKa7xeXkBOrubXu6SJNmGCYh2tONEIBlf53bfcIG6g6cBLvbdoLRv A==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="255838503" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="255838503" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 22:30:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="695011097" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga004.jf.intel.com with ESMTP; 05 May 2022 22:30:34 -0700 From: Lu Baolu To: Joerg Roedel , Jason Gunthorpe , Alex Williamson , Kevin Tian Cc: Jacob jun Pan , Liu Yi L , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v3 4/4] iommu/vt-d: Remove hard coding PGSNP bit in PASID entries Date: Fri, 6 May 2022 13:27:27 +0800 Message-Id: <20220506052727.1689687-5-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220506052727.1689687-1-baolu.lu@linux.intel.com> References: <20220506052727.1689687-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As enforce_cache_coherency has been introduced into the iommu_domain_ops, the kernel component which owns the iommu domain is able to opt-in its requirement for force snooping support. The iommu driver has no need to hard code the page snoop control bit in the PASID table entries anymore. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian --- drivers/iommu/intel/pasid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c index 41a0e3b02c79..0abfa7fc7fb0 100644 --- a/drivers/iommu/intel/pasid.c +++ b/drivers/iommu/intel/pasid.c @@ -710,9 +710,6 @@ int intel_pasid_setup_second_level(struct intel_iommu *iommu, pasid_set_fault_enable(pte); pasid_set_page_snoop(pte, !!ecap_smpwc(iommu->ecap)); - if (domain->domain.type == IOMMU_DOMAIN_UNMANAGED) - pasid_set_pgsnp(pte); - /* * Since it is a second level only translation setup, we should * set SRE bit as well (addresses are expected to be GPAs). -- 2.25.1 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35AA0C433F5 for ; Fri, 6 May 2022 05:30:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D3E7360BC0; Fri, 6 May 2022 05:30:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tf2FaT7jbo6l; Fri, 6 May 2022 05:30:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id C197660BAE; Fri, 6 May 2022 05:30:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9913DC0032; Fri, 6 May 2022 05:30:39 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4189CC002D for ; Fri, 6 May 2022 05:30:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 20961416F9 for ; Fri, 6 May 2022 05:30:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7tE4thRovNNP for ; Fri, 6 May 2022 05:30:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6B28041849 for ; Fri, 6 May 2022 05:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651815037; x=1683351037; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xo3GNZdRcwK9ipt9zUqLqMqh1EBzTdvgrneTIVh8+9g=; b=PrM6A1c2jiE+AYVopFm9GV2hQjk2eEb0IIx8IMboBdix8UkRueYBUSgQ 9aCbvfxSo8DO65sRLrao1klUu1eruqxo1VYzYPeC++ChOvYABfnrp+Pxc 1+JG13Xkb3g7thTZgddLabZfQdU/dJYmi4tX0T2aqJdXj1ik9b9v4umVc 5eqiZ6KoyblFM6qP7zyz8oF9jvnglQjsqAfw3b2WRkqVbKA9mgi1Rb2r5 3t8Lpj0IxuHZW5L+wSuIVnG8s+n9ZiIEfe7eDLDY+gu+8ZvadX/bfJBX8 JH5aZFWwx3WL4ElwaaX0b4JLjPZlq0U0Ea2za72AL2LvHK9+jkHdIdB3h Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="354790976" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="354790976" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 22:30:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="695011097" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga004.jf.intel.com with ESMTP; 05 May 2022 22:30:34 -0700 From: Lu Baolu To: Joerg Roedel , Jason Gunthorpe , Alex Williamson , Kevin Tian Subject: [PATCH v3 4/4] iommu/vt-d: Remove hard coding PGSNP bit in PASID entries Date: Fri, 6 May 2022 13:27:27 +0800 Message-Id: <20220506052727.1689687-5-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220506052727.1689687-1-baolu.lu@linux.intel.com> References: <20220506052727.1689687-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Cc: iommu@lists.linux-foundation.org, Jacob jun Pan , linux-kernel@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" As enforce_cache_coherency has been introduced into the iommu_domain_ops, the kernel component which owns the iommu domain is able to opt-in its requirement for force snooping support. The iommu driver has no need to hard code the page snoop control bit in the PASID table entries anymore. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian --- drivers/iommu/intel/pasid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c index 41a0e3b02c79..0abfa7fc7fb0 100644 --- a/drivers/iommu/intel/pasid.c +++ b/drivers/iommu/intel/pasid.c @@ -710,9 +710,6 @@ int intel_pasid_setup_second_level(struct intel_iommu *iommu, pasid_set_fault_enable(pte); pasid_set_page_snoop(pte, !!ecap_smpwc(iommu->ecap)); - if (domain->domain.type == IOMMU_DOMAIN_UNMANAGED) - pasid_set_pgsnp(pte); - /* * Since it is a second level only translation setup, we should * set SRE bit as well (addresses are expected to be GPAs). -- 2.25.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu