Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp979552rda; Sun, 22 Oct 2023 20:13:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEI2VD5KMNe+tiCXqxK+RMiX6ugiKviR/gmSKQMHrXSQ5Cy1mwmO7fxidZCs1mf321an+s4 X-Received: by 2002:a17:902:ed01:b0:1ca:3d9c:a752 with SMTP id b1-20020a170902ed0100b001ca3d9ca752mr5678237pld.12.1698030804497; Sun, 22 Oct 2023 20:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698030804; cv=none; d=google.com; s=arc-20160816; b=abysv3zsNrYT403zWTiHoUuHndt9aCEzhEbTSGgqGFPSNdcLdQx47j8ulMlX7OAphv djPUTjCw1iJE6+jU0vSLqNAdt+Ssk5DlNoZ9FCN/n8VCvrXFGe2ZRZWb3QVwWMBa2T5k 3prYXFYCSw87IxNayMFQQI4feG717yuevhdeQ5d00GhFfEVbyVPJb4xmX/IOC021DuD1 zzmSTL3TIv+iA+bXd4l9JxwSKWKLfLlS1ryqsuceeGADynGY7IwbOxjLrPlKRxn8BLn7 JhdYbiPAalnREaq7F/6K/7UDPMr/R/Tnxe/FCOABQRzoaTEMoADrYF0awcKQohVGCLVM rr4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=RNabGF4O/KFM4DzpMiWII4HUqIa7w/31f4hQXaPXibI=; fh=/TX4I2sPaonuoxkukYjQpTqnWwDP1NxWoTZKu+Tmvy8=; b=YrDMhwLXgPCDj9XpMELawd1zqG2SwTinxCWhtxpNyq+ae548qzRogcJSlYm71T4QGo ktyVXARsF+3YI57Nv1yU7Htugwm66GA9jp5vux3tf9xRdZj383EBO6LqUrXem0wT8eqW LVW02tjE6e+d9gWP2kIwHoV6Eu0g9YEixffDTmt0kdClvWG+4NTd71yi5IrwsN2Q8Y4j NfjeuGg6mzM388ihsFzcyYMS0Sq1XUbiaYT7TGs/bB1WL7AW607LHawzJa0Fv5dkKI6T zXsHKawbaNwbLlcQZcl2BBw9hCjt99i6LwjFj1ONur9RkiwVPf2bDdBw7j2ffAzv2iPf FD9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N8AnDAa+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h18-20020a170902f55200b001c9ca0167e2si5921299plf.420.2023.10.22.20.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 20:13:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N8AnDAa+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8276E80615EB; Sun, 22 Oct 2023 20:13:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233223AbjJWDNV (ORCPT + 99 others); Sun, 22 Oct 2023 23:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjJWDNT (ORCPT ); Sun, 22 Oct 2023 23:13:19 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 443B9AD for ; Sun, 22 Oct 2023 20:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698030797; x=1729566797; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=AeWTtkCsGMX/D1evCPohfI5Y/jQTw5z4QJVr/hc1lsY=; b=N8AnDAa+ugimiEowmqdXhv3if6CgwfDocfTj8R8RhRSACqAP71gPpf9o VRfIs8+rgoyo5jmYTl2z1xgYHlUWT7R6H8BcIjDlUy9OH3aSYob2FwJl9 JLDG1KYSGa1UUN8WEFT7B/B6JXcdRKpmXhN+8jdFdWzRYFCBQb39COURB aAPydZLNfxAvCux2UgGP406OftghXtpp+CRmCv4T/pN6HdC44zmSXjAWd FGqmaCbS9Nb3Dwg4LptFjUPY6cSftdpvU/1Bl1q7gZeRI6wtA97jWc3Xl 6Y2enel7AeAFk25eslwZ+YMa0KQAnV+xF43m+wv7NLpz3nmRgU+SFlrc0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="389604102" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="389604102" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 20:13:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="5932824" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by fmviesa001.fm.intel.com with ESMTP; 22 Oct 2023 20:13:09 -0700 Message-ID: <400f2708-1186-4ca4-b4db-dc46b9e636b2@linux.intel.com> Date: Mon, 23 Oct 2023 11:09:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, "joro@8bytes.org" , "will@kernel.org" , "robin.murphy@arm.com" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "Liu, Yi L" Subject: Re: [PATCH 0/2] iommufd: Only enforce_cache_coherency when allocating hwpt Content-Language: en-US To: "Tian, Kevin" , Nicolin Chen , "jgg@nvidia.com" References: <2201ae4d-b825-49a5-ba73-c6b310e2969c@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 20:13:23 -0700 (PDT) On 10/23/23 10:55 AM, Tian, Kevin wrote: >> From: Baolu Lu >> Sent: Saturday, October 21, 2023 9:33 AM >> >> On 2023/10/21 8:37, Nicolin Chen wrote: >>> https://lore.kernel.org/linux- >> iommu/20231020135501.GG3952@nvidia.com/ >>> The conversation above concluded that a hwpt should only enforce cache >>> coherency per device at the stage of its allocation, and it should not >>> be changed or updated in the attach/replace routines. >>> >>> Add two patches dropping the enforce_cache_coherency calls from attach >>> and replce routines respectively, since they were introduced with two >>> different commits. >>> >>> Nicolin Chen (2): >>> iommufd/device: Drop enforce_cache_coherency in >>> iommufd_device_do_replace >>> iommufd/device: Drop enforce_cache_coherency in >>> iommufd_hw_pagetable_attach >>> >>> drivers/iommu/iommufd/device.c | 19 ++----------------- >>> drivers/iommu/iommufd/hw_pagetable.c | 2 +- >>> drivers/iommu/iommufd/iommufd_private.h | 1 - >>> 3 files changed, 3 insertions(+), 19 deletions(-) >> >> Hi Kevin and Jason, >> >> With these two fixes, there's no issue in the intel driver any more. Do >> I understand it right? >> > > But code-wise it's still good to explicitly disallow enforce-cc on a > non-empty domain if there is no plan to support it. Just no Fix to > stable. Yes. Make sense. The device driver implementation should be self- contained. Best regards, baolu