Message ID | 20240222090251.2849702-3-haifeng.zhao@linux.intel.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-pci+bounces-3853-incoming=patchwork.ozlabs.org@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mz/+7ioc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:40f1:3f00::1; helo=sy.mirrors.kernel.org; envelope-from=linux-pci+bounces-3853-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TgRyd2sy3z23hY for <incoming@patchwork.ozlabs.org>; Thu, 22 Feb 2024 20:03:53 +1100 (AEDT) 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AFCEAB22A48 for <incoming@patchwork.ozlabs.org>; Thu, 22 Feb 2024 09:03:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA68336B1B; Thu, 22 Feb 2024 09:03:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mz/+7ioc" X-Original-To: linux-pci@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 5B03F381D0; Thu, 22 Feb 2024 09:03:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708592606; cv=none; b=U6NZdCBo75D0zdTT4SDrGv8u52bd2rZKnu06Vh55Zz24+yR65ZaL+xdNE6OJNDSw0TDf5XFtQucHmyuxaVZ7FZ2MRPDVuYcHVTTNI1BIe0BOghfMdvH8P2pdmKQMwTtbLWdrXqc7YzCiUdGr7fz9hVOehsGvErhXg/ezDPBdrMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708592606; c=relaxed/simple; bh=a7XdviOurXqd+UxiwOvQTQYdFqRYCE9FWEvr4+FRLAA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gsm/1v+Pt8HmZyX++2pJCJmnoNiU1xaRMWDV8BYiVT3FBCkiVyoF1YnyBbxm9wgE3yTTMfpaXwIhNAIjsLmw0b7b6SrEOtmSm8IFpTuDsFIjxWQof+c9cpu9KarnP23LZu9oQqABC+nDd+93kR/A0qyrTDFjtWJKGClZiKrhw94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mz/+7ioc; arc=none smtp.client-ip=198.175.65.9 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=1708592605; x=1740128605; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a7XdviOurXqd+UxiwOvQTQYdFqRYCE9FWEvr4+FRLAA=; b=mz/+7iocUshVzC7gVnrX7J33X/4PHSNNTVUf6KSngaNoy82LGfqg+KVv dsmUr8hsKT0jbonEffJJCGX7LKY9exhWd5CYBtc4N4SnTWlS096OZLjhv RulBioy3YwOBSQzCsAvtPnQZ/6JMYQJHPlf7YdsW5sbND7tOGvEq5aK28 +IjfnmZjMPPyMCsHBZ/fIj6g1brT9+6C2fsWwp7KwVqAk8AI2jWEGxct0 V1GFU4lMHgIta3uw6Ax+7QRkdMtZMjYJo5/vvoogFKuNNYsYnmE1hxign y4wNjR7ki4MPZhF3MCH9aVv1ixcTla01iFfiDj1o61gUq/I2+woOWS6ys g==; X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="25264474" X-IronPort-AV: E=Sophos;i="6.06,177,1705392000"; d="scan'208";a="25264474" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2024 01:03:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,177,1705392000"; d="scan'208";a="10122658" Received: from unknown (HELO ply01-vm-store.amr.corp.intel.com) ([10.238.153.201]) by orviesa003.jf.intel.com with ESMTP; 22 Feb 2024 01:03:19 -0800 From: Ethan Zhao <haifeng.zhao@linux.intel.com> To: baolu.lu@linux.intel.com, bhelgaas@google.com, robin.murphy@arm.com, jgg@ziepe.ca Cc: kevin.tian@intel.com, dwmw2@infradead.org, will@kernel.org, lukas@wunner.de, yi.l.liu@intel.com, dan.carpenter@linaro.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Ethan Zhao <haifeng.zhao@linux.intel.com>, Haorong Ye <yehaorong@bytedance.com> Subject: [PATCH v13 2/3] iommu/vt-d: don't issue ATS Invalidation request when device is disconnected Date: Thu, 22 Feb 2024 04:02:50 -0500 Message-Id: <20240222090251.2849702-3-haifeng.zhao@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240222090251.2849702-1-haifeng.zhao@linux.intel.com> References: <20240222090251.2849702-1-haifeng.zhao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: <linux-pci.vger.kernel.org> List-Subscribe: <mailto:linux-pci+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pci+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
fix vt-d hard lockup when hotplug ATS capable device
|
expand
|
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c index 108158e2b907..746c7abe2237 100644 --- a/drivers/iommu/intel/pasid.c +++ b/drivers/iommu/intel/pasid.c @@ -214,6 +214,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;