Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1801761rdb; Sun, 24 Dec 2023 02:32:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IED70FgAsU15+Lt8b+apEWyR8Islb4iY1ww3HHvXKYFUqpdGNYs2G16qs3/2KfFjqN78Nbz X-Received: by 2002:a05:622a:1996:b0:427:91f0:7f8e with SMTP id u22-20020a05622a199600b0042791f07f8emr5181881qtc.12.1703413966345; Sun, 24 Dec 2023 02:32:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703413966; cv=none; d=google.com; s=arc-20160816; b=oxUPhE686oK4q620HnE3f/18h4Cw8SWVh4TwfnvSMnc2skVciGL/IW64/WNK5aBdR1 lKfHi70kBmeHymr6FJCx+N3M7g9ojwsEXrKKQMEeZ9YJV14Bx/Zm61F5JvY/WiE2+Ze6 cbtlFS6c1L9joGx/KQ1wVibUz3aLOAS7ohHA2Xuk1L4I0OUMm469JddGo4SdZoQsqbIR ZQU7vIHUjPjdu0QQC0I7mc+QqMlUh8lzzlYhhLtvlwInJHe50aSv6yQ0yJwVKsgHu0qp /LAIGtdwosPic3kdp4GB4/nl9hrH83Q747s7mbflryFeTA08+cE+x176wvNNiovXcU2r DrXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=h08gYnZLO9c/B3JtFldoTRFTPG1mYt+u7NcRBfxyUCU=; fh=DHEMuZO50Ax5xBtjxa5sqB9Udspp1xRBp9zNoCKdeN4=; b=h6Y6vxN5j7qHhOWE0jmHNZAlIcWn7eB4UQnUg6lQctDoSpzZ2Zwc780FPnysxyzp8/ D/5dsytzmvGKqSzOziugdJePemFfwiqyW/W+JpfbB1PzRVxXxsDdWGWXsza+mS4DvsMm xOOuP1mSrsb1ZH7KrtHD9j0AzNoYbN/Ciqwj15BVSaB/uedBpQ9bkwsCEuYNDv62JMuW my3ha2OVjtUGzhqPDwfhw250+5GyGiCBK/LlW9A6pa+D/VQMLIad5tzJQRplfqo3ymZ6 SO7R0Gr+nvge+h6dyX4zt7GlpsIMP6kW4363p1OPaBboihPyOV/ENJMgRSr6VRzDe96C f9mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10685-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u13-20020a05622a010d00b004260b9d4a71si8528633qtw.144.2023.12.24.02.32.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 02:32:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10685-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1CA781C20DFB for ; Sun, 24 Dec 2023 10:32:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6D232101; Sun, 24 Dec 2023 10:32:37 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (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 7ABBD1C31; Sun, 24 Dec 2023 10:32:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id E8C4D100D943F; Sun, 24 Dec 2023 11:32:25 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id A6B1130E54; Sun, 24 Dec 2023 11:32:25 +0100 (CET) Date: Sun, 24 Dec 2023 11:32:25 +0100 From: Lukas Wunner To: Ethan Zhao Cc: bhelgaas@google.com, baolu.lu@linux.intel.com, dwmw2@infradead.org, will@kernel.org, robin.murphy@arm.com, linux-pci@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v6 2/4] iommu/vt-d: don's issue devTLB flush request when device is disconnected Message-ID: <20231224103225.GA31197@wunner.de> References: <20231224050657.182022-1-haifeng.zhao@linux.intel.com> <20231224050657.182022-3-haifeng.zhao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231224050657.182022-3-haifeng.zhao@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Sun, Dec 24, 2023 at 12:06:55AM -0500, Ethan Zhao wrote: > --- a/drivers/iommu/intel/pasid.c > +++ b/drivers/iommu/intel/pasid.c > @@ -481,6 +481,9 @@ devtlb_invalidation_with_pasid(struct intel_iommu *iommu, > if (!info || !info->ats_enabled) > return; > > + if (pci_dev_is_disconnected(to_pci_dev(dev))) > + return; > + > sid = info->bus << 8 | info->devfn; > qdep = info->ats_qdep; > pfsid = info->pfsid; Do you even need this or is patch [4/4] sufficient? Is there a benefit to the hunk above on top of patch [4/4]? Thanks, Lukas