Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4436481rdb; Fri, 29 Dec 2023 01:24:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5btT3bn22yv3O90af03//Wn2N2WU805S/vjTpszVaXcJ1BXTCqJ/UuKT4Xs5s/qflAN8J X-Received: by 2002:a17:90b:128e:b0:28b:d79e:6731 with SMTP id fw14-20020a17090b128e00b0028bd79e6731mr5817215pjb.29.1703841898086; Fri, 29 Dec 2023 01:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703841898; cv=none; d=google.com; s=arc-20160816; b=VDniYBB1aTwxrlcHtYujGSslo3sG0I9qlhqZyKcc5QXRhsfHXzGWgSjX9GmkR8XAvD BydgFsfTHGGUC/+P4TLo3r5dDf3Xpj7XDujtLEFGsAxipho6rml1dpI11Yjh7Bijp0s3 YbAKZiwBFnxwCQRaE/CPPwOB512fLaSb6BG7zP6mlKtX5rp0RPHzFW4CpQpBct0Jxs+G tZ7V2eg1BHmdLojhf2SHz0n/B2MC2Ca7JLGW9YHU5KoGfyhZAhuinnwKsYstpukAHpUk UzJbO1P66O0N0zusRR5Q+oe/wSlWS6Pb4Q+u7Rl+3hJ2uiMzZaM/G/lmwI2cbCIQWRSb QTdA== 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=XDhd0Xa9+6JYfqTZvBSvywYtTx4Mmoifld3Hlid0ZKw=; fh=5zLOwD0S3wC96OEpeaArQtHf0AZNszbOE0b79dRPq+g=; b=K/iXj4JlXcpvIMBqNC7pecmR6tyZ6228nzhYMYwveXq5ige+jLD4ft2KjQ+MX+Zr6G b9k2nnQ4Ige+nk88ahsy0npz+8vN8XvaiWQbd5cMbgr5gdFMazYPqXXAw0xefuTLWMY4 G8CFrfGh1i9vhv5SxT8/fiOUS7g+aAZGWpgOdoy22+FF53f4K2BhRVX9FA7U9kHxGFtL Bb06/V66EuywF7Ncpee5ND6xU7deZHV/o8znXDI56qJX1OJxQqphEFQJLzab+amemazV luuyJuTf/OVmMnPkbOtrM6qwfAdT9qkKhJURM5qon8aorU+YReu3wAyRdQINvNWzWNAm I2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cZ932hBb; spf=pass (google.com: domain of linux-kernel+bounces-13025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s7-20020a17090b070700b0028b2b3d252csi14032136pjz.29.2023.12.29.01.24.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 01:24:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cZ932hBb; spf=pass (google.com: domain of linux-kernel+bounces-13025-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13025-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 37BF32822CB for ; Fri, 29 Dec 2023 09:24:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3B6B10A1E; Fri, 29 Dec 2023 09:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cZ932hBb" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) (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 6938110A00; Fri, 29 Dec 2023 09:24:37 +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=1703841877; x=1735377877; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=6eyA6I/IA06zG3oVXU054nozNu51dK0BuoClY9Ax83c=; b=cZ932hBb1BOhdSUp3sXeQOHKmSERypV755ey1Qv2fPDoo3aKaMhRljYd rHqOKIYXkVKoIZhe4aJbAkdlOcuzHrYnsAppNJYe99moK+e9E4QkCLSGh SjccqHHnikekaMVMFXx468kSUrr7by9+3CaqgR4qgOCRAIigMnNsZ851c H2j03GX9nq4wWyfi47z0om6jsJ8w5jJ0l2suSe2gz4bLzOoftTb9s/sXB SABAyPiN2avw2XyfBDvrQRZIC4Qdl7tDUdTdFTbm25BcjvbfRJ7xnBjP1 nCFg004nLbvdWLbKccT4zWEJPlhsf3LR+2uK6qxhiv42UJ5WT4od0mGBj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="399414616" X-IronPort-AV: E=Sophos;i="6.04,314,1695711600"; d="scan'208";a="399414616" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 01:24:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,314,1695711600"; d="scan'208";a="13238090" Received: from zhaohaif-mobl.ccr.corp.intel.com (HELO [10.93.26.117]) ([10.93.26.117]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 01:24:34 -0800 Message-ID: Date: Fri, 29 Dec 2023 17:24:31 +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: [RFC PATCH v9 5/5] iommu/vt-d: don't loop for timeout ATS Invalidation request forever To: "Tian, Kevin" , "bhelgaas@google.com" , "baolu.lu@linux.intel.com" , "dwmw2@infradead.org" , "will@kernel.org" , "robin.murphy@arm.com" , "lukas@wunner.de" Cc: "linux-pci@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" References: <20231228001646.587653-1-haifeng.zhao@linux.intel.com> <20231228001646.587653-6-haifeng.zhao@linux.intel.com> From: Ethan Zhao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/29/2023 4:17 PM, Tian, Kevin wrote: >> From: Ethan Zhao >> Sent: Thursday, December 28, 2023 9:10 PM >> >> On 12/28/2023 4:38 PM, Tian, Kevin wrote: >>>> From: Ethan Zhao >>>> Sent: Thursday, December 28, 2023 8:17 AM >>>> >>>> >>>> - if (rc == -EAGAIN) >>>> + if (rc == -EAGAIN && type !=QI_DIOTLB_TYPE && type != >>>> QI_DEIOTLB_TYPE) >>>> goto restart; >>>> >>> this change is moot. >>> >>> -EAGAIN is set only when hardware detects a ATS invalidation completion >>> timeout in qi_check_fault(). so above just essentially kills the restart logic. >> This change is intended to break the restar login when device-TLB >> >> invalidation timeout happens, we don't know how long the ITE took >> >> if the device is just no reponse. > if in the end the agreement is to remove the restart logic, then do it. > > it's not good to introduce a change which essentially kills the restart > logic but still keeps the related code. Here, the device-TLB invalidation, depends on devcies response, no one could make sure the what the third party adapters will act. but for those invalidation issued to iommu itself, should be more likely to survive ? Anyway, would like to see more comments. Thanks, Ethan