Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp57901rdb; Thu, 21 Dec 2023 02:44:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaEAG+yg2J4LCqYCQLCFg1uRcYJt3apemC8fRCAQv2Ce3St5L4rhIko2K31VgOifjxbv53 X-Received: by 2002:a50:8d8c:0:b0:54f:54bc:a1b3 with SMTP id r12-20020a508d8c000000b0054f54bca1b3mr6447380edh.45.1703155471954; Thu, 21 Dec 2023 02:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703155471; cv=none; d=google.com; s=arc-20160816; b=Yrm2bp0N6Eo/8ugcIdmib61c6a8IYxOYr7ZInJaL0F6YsY+2tf+7WI5ZLlr7uha/TV g5rzFs9Ex4adGOUeZKIz7gOMM8O2wpAHbpMBe/fkOKpCERwmzd0yP01/OCCvWtTvn+ap Oe5NWverVMsBPIMdZDswCGniwfNPxcqg3sxlY8n8e0YGmmwcE5DFzblaAi6sbQgyJVMY YcDxhmTvsOCWJNhJcywnDLBK1oGSYS+BwuE8FpwXc4sGC8IIPE8nGG9EiHtXd0KlFKIT Ui/snhxHIRD6CFNgeg5xfLuEGScZN0aluwnxzueqjPSAv19SKjyQeBCnCZJJdxnA/lqf 1qRg== 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=0+eQ0bHq6GpgxmxhhlzvZH6V/bZclp13KK69n6vuba8=; fh=yh+Sss/76szH56CqbqATaaHCKRqvH4wjNEsuA57o8vc=; b=rgAqt25pzb5EP+H+EIE+OvbfTjLXIrO+4pKxJ9a3U8GZWFyT7WwhmkzyuE/fMoBXVh tCCl3IyZsEeJNTn/fIolSXLTHImuEybYbQ37ad5uBiFyhjjb9gRnYWSceumQbKVRxQda RXOoAXSCF2vKSYddMi7onqaNg9pURO6YSGn09Tp2Xhv6iI9pOmhji+k4iiOA3UxuV0Ak hW3BVnwVmM6CemVg5GNTuQIdFDVdJ0s7p223+CGmqIGDYh0U9NEJ3Hzi7o8H7rmtMTqY P13ptvkJ4E5UC52uWO4njwQ2oyEPZkTu7erMlcJfKmVVEK9ANM2+fkWuWtMMvgjcZ4hH TPAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8232-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8232-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b12-20020a056402278c00b0055150f8a741si747481ede.351.2023.12.21.02.44.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8232-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8232-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8232-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B43A81F24F3D for ; Thu, 21 Dec 2023 10:44:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB1CA6A02F; Thu, 21 Dec 2023 10:43:03 +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 92A7D697A5; Thu, 21 Dec 2023 10:43:01 +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 65770101DD8A5; Thu, 21 Dec 2023 11:42:54 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 298141782A; Thu, 21 Dec 2023 11:42:54 +0100 (CET) Date: Thu, 21 Dec 2023 11:42:54 +0100 From: Lukas Wunner To: Robin Murphy Cc: Ethan Zhao , bhelgaas@google.com, baolu.lu@linux.intel.com, dwmw2@infradead.org, will@kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Haorong Ye Subject: Re: [PATCH 2/2] iommu/vt-d: don's issue devTLB flush request when device is disconnected Message-ID: <20231221104254.GB12714@wunner.de> References: <20231213034637.2603013-1-haifeng.zhao@linux.intel.com> <20231213034637.2603013-3-haifeng.zhao@linux.intel.com> <20231213104417.GA31964@wunner.de> <3b7742c4-bbae-4a78-a5a6-30df936a17d4@arm.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: <3b7742c4-bbae-4a78-a5a6-30df936a17d4@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Wed, Dec 13, 2023 at 11:54:05AM +0000, Robin Murphy wrote: > I think if we want to ensure ATCs are invalidated on hot-unplug we need an > additional pre-removal notifier to take care of that, and that step would > then want to distinguish between an orderly removal where cleaning up is > somewhat meaningful, and a surprise removal where it definitely isn't. Even if a user starts the process for orderly removal, the device may be surprise-removed *during* that process. So we cannot assume that the device is actually accessible if orderly removal has been initiated. If the form factor supports surprise removal, the device may be gone at any time. Thanks, Lukas