Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5260283rdb; Wed, 13 Dec 2023 04:00:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEqvPFECHi59YTaVPleulMKEONCObiYR4lqr5ETtZZnwmd1Z76+cTg1+ijJmVrNlgUQnHR X-Received: by 2002:a05:6e02:170d:b0:35d:5cf2:f54c with SMTP id u13-20020a056e02170d00b0035d5cf2f54cmr13196142ill.15.1702468799762; Wed, 13 Dec 2023 03:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702468799; cv=none; d=google.com; s=arc-20160816; b=gh46jcQip4LK5BS0Hz7xh76RP5ZNnSgRUe2iFZ6LAzTymqzcAi0NWLMdD7yd6AMGjV zNVZ3/lALO/0GFecTKlu+cMYdUNyTpf/Nk1whj+JtPalpYXf9jOIT+gsFKchSktydMSm o6OjBufoMr/ufUVZf0slayjetfhlCO3wetaxZRR1ZV+7ekdAKSYBInwjMbGbnJommj+O bzHOKZdtOnhNUmyAwGmhq9olXZnIu5rL14BST5H3F3CDqDWNlM2IOrIfDGnClkEndhxR GSgmL7BOGTMk+OW6CEOBpZFx8bmlqr1mJ8DRZXobur8MLg3n93dAypCJrJ4qRwy8pjrg QKmg== 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 :content-language:references:to:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=ZPVp3ETxXIxALqF5k4Z5/m0QF1K6hbpGTk+sb7wheQ0=; fh=iK+r9ITYtqt8jcchEcjU/n+CeXTPewxWBscKjrvCr4s=; b=Om4vlnWPdAfR/eC66dVBmjkqn3vXgIB1Q1w/G0tQ1TLJwLdCOibn0DOfp85hJ9wZjZ FPb+uUgbgSmcPjPEW1rHgTHNo0evf8VpsfXcmvUA5+uM2KbZ2+DrybrWNNAgDiKqhxay LZ80i5jnKpkD10tBUVIq8ybtG3gw17GMFe3lP3LLkPKXlqHUtbHJx5vySRNKOORhKbYK zjygHD15qpEPFh72vE0qGrkh9Vbx3y7FOD3Jg3m0U/Xa81B3wAbYRXjBxix2drFSUq2u 7lTHtl0jpSzl6cF9YR5aihh2UIufNSfa6ivu5hZbLrBTbuezAve4qioznjZ4P/n+pI90 5S4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FHljVL0p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w13-20020a170902a70d00b001cf817b01d2si9425960plq.277.2023.12.13.03.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:59:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FHljVL0p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 5E8468182DFA; Wed, 13 Dec 2023 03:59:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235338AbjLML7m (ORCPT + 99 others); Wed, 13 Dec 2023 06:59:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233527AbjLML7m (ORCPT ); Wed, 13 Dec 2023 06:59:42 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96743D5; Wed, 13 Dec 2023 03:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702468787; x=1734004787; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=ZPVp3ETxXIxALqF5k4Z5/m0QF1K6hbpGTk+sb7wheQ0=; b=FHljVL0pX72GImrS7YZAZ66m5GI1du07nvfUUJCB9+51amNjaagQ51As NcLSxei4QAD8xNS3zAwBkjmYIUsNiGEM0O13Hs6i9Eb98zxWmQheOCHOJ BJ8QKhxhkxQxtNmx4KfVcFVbTeHEdXKSWQ+7Y+lf5/BmPyq7HNqfCWMMI COHL3cVJXpkVqogh4y9dAplD8XWpM90gQKVSOQW29Y+SNjg3uhXNYBBDD 8AiZ3InbGNXMbF675uC52kdrTHoTA/0AWsbe28MrpNCK8HZzkdAXE0VZK ht8sUfx+1aIuqJu0tR4BO1YSHAxQhxnG/CeRhLuwu97ZECcOLqZCy/Zu5 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="1808504" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="1808504" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 03:59:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="839837065" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="839837065" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.212.246]) ([10.254.212.246]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 03:59:44 -0800 Message-ID: <96051115-c928-4f3c-bd65-4f3f8e83ca9c@linux.intel.com> Date: Wed, 13 Dec 2023 19:59:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, 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 To: Ethan Zhao , bhelgaas@google.com, dwmw2@infradead.org, will@kernel.org, robin.murphy@arm.com References: <20231213034637.2603013-1-haifeng.zhao@linux.intel.com> <20231213034637.2603013-3-haifeng.zhao@linux.intel.com> Content-Language: en-US From: Baolu Lu In-Reply-To: <20231213034637.2603013-3-haifeng.zhao@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 03:59:57 -0800 (PST) On 2023/12/13 11:46, Ethan Zhao wrote: > For those endpoint devices connect to system via hotplug capable ports, > users could request a warm reset to the device by flapping device's link > through setting the slot's link control register, as pciehpt_ist() DLLSC > interrupt sequence response, pciehp will unload the device driver and > then power it off. Is it possible for pciehp to disable ATS on the device before unloading the driver? Or should the device follow some specific steps to warm reset the device? What happens if IOMMU issues device TLB invalidation after link down but before pci_dev_is_disconnected() returns true? Best regards, baolu