Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp557077rdb; Thu, 21 Dec 2023 19:20:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCzDayITvgroAv5gCoFGdjEooXNWG9NC5cdGeSWipcCHNR6zOs6XO4N13l1uYvcOLf0QGL X-Received: by 2002:a05:620a:2215:b0:77f:6e2:3488 with SMTP id m21-20020a05620a221500b0077f06e23488mr805796qkh.154.1703215235871; Thu, 21 Dec 2023 19:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703215235; cv=none; d=google.com; s=arc-20160816; b=xsy3Ux4zwQYMaDiIsNnhM52QXlQ9vYtFaZrnPdeDDS2hN1sNNkrtsSd9EuPr+B1K98 3I8fgyxZ42SpPq8PWxbbH4+LbG5haPYa8clQspPo59CnASSQ+TTBhdFlkvS3qgt96R6t fxRJMbl2kBgERML8vNDP6N6nr8pwkE5s1Rs5k/Oqd7EWfhHTdznTEmJ1tyw64rHeMjKn E5h5ja35FdyoItwDgwQB//MlBq6imL7NPtL0Fb5kMo2oamSaNb1nVvzpTMrKZHlcLjc7 hvPm+O2JHIU1gw3zyflpXHokKH1EkBVtbEy/9/pRiIG1GdrXvJhvU3+AczU8zzUcpHsE e33w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=IenO09um/f1Evkgc5+QiXS6Ruu8VpdPGEfkEXl2xQ+0=; fh=H6YtCDomxNKUhPrT+IPy2hUNhLRFF2cPRkuaQ461sms=; b=jXIHgmrMkrOvKvVJPRRLXIzNugmKksBiQcTmqg38oTDeGdrIFjxTjzPfGkLg0XqZDN 798Yo2M38SakxCIAhBON+LAk50LDjTrm6Q2bxRbW9JE4L8Lk7/PuvVU7yaUuBLA4iMCy 088nWesgLty5AtJoguGcpO2YGjwR+u+EoAzHtN2V9TMjennJhIj4UAe7krwYWFgxCvsD eBeK+x9tsow5JZf7D9I8Vdv+O5qbj3I8SE9tK3XAdKQeeAQgn2ziye463/ZLGfFj8Y2J vssBbpcgIVikAzU8P3t7zK0eLa6YZ2wAY2z9HW6cRMqbThlU6szSaGtbVCIfR+hIRadw 6rOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kR7GdQSK; spf=pass (google.com: domain of linux-kernel+bounces-9282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q16-20020ae9e410000000b007811dbe9338si2723924qkc.250.2023.12.21.19.20.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 19:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9282-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; dkim=pass header.i=@intel.com header.s=Intel header.b=kR7GdQSK; spf=pass (google.com: domain of linux-kernel+bounces-9282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 899A91C21272 for ; Fri, 22 Dec 2023 03:20:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EE83184C; Fri, 22 Dec 2023 03:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kR7GdQSK" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 28F878F49; Fri, 22 Dec 2023 03:20:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703215225; x=1734751225; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=zwvJZipX1RTKD4/apP3DQT5aXdl1Ua3N+TL6Z4LeVts=; b=kR7GdQSKpDF9xKZp+Zp6qw2mcy2fbJAu/7b4G2nsYCFhZUQDKV2A0RJ/ cQPV12uSzzk57ggl/Azb+vD0TawyaHDpefVsgl7xmA80q+jvxYKURGnQg rmN20ryA9ut6bLjYn067LAvErK0TFUJfcd8lqOoL+ElfZyrnCpKl92U9q j/NZrQmOIJMzIw9rmHWVTwxK9dpLyD5QSoVwZmZYu1kHwq7SzYfcenQtY Yz+e9tSiZFCprUXfM7P8iqKxGolEPvpBXwBnPcPuOaJnAKVkVucZ3IFhN 2Fo7uIliMUOmzsAYw2MC1s7UB2i7wUewf3Ghxu4oBL7VTIojFxtKEijP2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="3307293" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="3307293" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 19:20:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="805820544" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="805820544" Received: from zhaohaif-mobl.ccr.corp.intel.com (HELO [10.93.26.36]) ([10.93.26.36]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 19:20:20 -0800 Message-ID: <589b2dbc-325b-404f-a387-b1c99a064d15@linux.intel.com> Date: Fri, 22 Dec 2023 11:20:18 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] iommu/vt-d: don's issue devTLB flush request when device is disconnected To: Lukas Wunner , Robin Murphy Cc: 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 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> <20231221104254.GB12714@wunner.de> From: Ethan Zhao In-Reply-To: <20231221104254.GB12714@wunner.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/21/2023 6:42 PM, Lukas Wunner wrote: > 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 There is no hardware lock to prevent user powerring-off/removing the supprise-removal capable device before issuing ATS invalidation request but after checking device connection state, the no target request still possibly be sent. Thanks, Ethan > at any time. > > Thanks, > > Lukas >