Message ID | 20240215072249.4465-1-baolu.lu@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-66362-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp284978dyb; Thu, 15 Feb 2024 01:55:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVgOD6DMI5WX0eKPVddmaxJVOglQSj2jUFVBpyAcHsVFG6kMW6isqHKfVVqYedruNaKNVr5hsbh7WHZCIA4ss8xkEHTJA== X-Google-Smtp-Source: AGHT+IHOi7qOU6Ys+zrMyiScR4MF9DqJFFgFsi9WVwjjuZ6z0X1BW6OQ7NaMP8d4nRzm/IOPsRMV X-Received: by 2002:ac8:7fc4:0:b0:42c:7c15:b6c1 with SMTP id b4-20020ac87fc4000000b0042c7c15b6c1mr1493213qtk.47.1707990950614; Thu, 15 Feb 2024 01:55:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707990950; cv=pass; d=google.com; s=arc-20160816; b=PecaBxCM7r2J8p9B2HctzF3zGAEG1q2b4BWfBYloV9gjsmgzEBLsJPwe1LwF+y8eV5 boyiQLDRT9MTRwdGT+ws/bxA15h8W+kwku9czWurfa9pCjgp1mqrNwLAf/3i+juc99nf 7boUqh+0VEnvk27ZKtLOJqLIzVcN4zOk+wo6TpDuAxGKpFiasMEnI+jDOPT6Fq9Znicq b4dlsLr9eSq1CsP5mWzJxZb0NT94lVoNt4Cb+TrX1A+Y4TQK4emQs6LKllX5xW1gVzoJ P4J7YW5nI/X/KVuW5iIMlV1Vl62jA5vf72NgVsZls7LJsfNX5MezmoOnxV+YXTPU7uzQ yIyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=deD0rAztWFPSGo8RoSujnwjuHYPyDx9VtQj9E5CFDyg=; fh=esDB3+0OCkV0k6lekB+/rVc1ngU7XdLUIuu2HCpqCtw=; b=MOvTjqpeS7NSSwp7mOWKkeFRQ0SDOgl8Z+N4FvoQ1THiXo2W11QMoEppV2K5PLMTZa 2UBn1Un+LZsyIVzVfravMs2U7QqKo6FlToE2+fFAdQ6oCe4y0DEfsRBpSe9YWebHpeFb PUKqKjw45oIBFO5PXvSSOa5xUd75D5UgXNRQ++vO09pf9jyJAwaUSdiG5YxeeWYvI23J iQvLX500+14POCsnpwjOC9fU1YPhKHEKpJ5kwRkon22X2rE1VLgm5xJZCZLOmqHvZ4rO cu2mrMwKajHrqTdi6+C+ThYJ8tfv4lxZP4T9g2TjAKrIdMYjr7KNNej/5xjFpFz2UFp5 jVRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hUB9eZGz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66362-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66362-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m14-20020ac866ce000000b0042c5fb0e278si990992qtp.597.2024.02.15.01.55.50 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:55:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66362-ouuuleilei=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=hUB9eZGz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66362-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66362-ouuuleilei=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 3D3551C21751 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 07:29:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2C9E134A0; Thu, 15 Feb 2024 07:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hUB9eZGz" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 1B4C712B7C for <linux-kernel@vger.kernel.org>; Thu, 15 Feb 2024 07:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707982132; cv=none; b=jF3d92kiyVgZs5zyioEcGBa37mNzCPo6a1JP5kP0OUfDGtqIqmTM3h/ZqdVuLWq6pJpxav0AcvLLDdkWxs7DAmNfu2luReJMAlSagfX/KwQMTq3qR9rPZ/rYaHSEwgT6BKj2QYDIZ2LSgqYVTU8aUJNMmCMl07rq7zF9KdH1Bo4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707982132; c=relaxed/simple; bh=BGali8YR19f9ZRyzTwoqv3iiNG9oSUbGHt1wVtsRN2w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MF1YcbiVepPy/1SFK7gw/0JzHP9v52M8TEzzqLS4cb4KgK4LjQZtHRH4lx2xuX6pqO84bIgqKXayeAFRrtRaBHVlDUYvL38D0xRCiKf45EEhgxjKFKwPs05g4DNCKxc8b3Uph9xtl090yy35CGXPkf/ckTEteXFYycKtcsijzm8= 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=hUB9eZGz; arc=none smtp.client-ip=192.198.163.15 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=1707982129; x=1739518129; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BGali8YR19f9ZRyzTwoqv3iiNG9oSUbGHt1wVtsRN2w=; b=hUB9eZGzHlHudCoJR/sKTeOEveQbLp+dZ9ObgosQppQYcmPV/pAv7Xle trezkfH9lqeS/EmmaHw/7a9ydjM4luIm3GJWRlJXeSz5CdgY6u9XwTFWR ROXmM8nxh4gnjWUuJuznMz3O+geXmRDjJpPj8bFAOIwUc/DJHZ61qG+ZN IBbfS3flJQChuYIkz8KkxSBNbHJnpOlQeC4EhYI7MEw44tiUo4EzQ5RX6 uqJqXZLZP+jlc1jjn/zp+kSF57JED+uUww+Bi4WFqLDjYG7Sa3+Nvm0Mx kugyyurpUvN2F/cOdD0OvwOty6kR86d+Jkzeawd+7yVWK5h+icAkhoFDU w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="2182705" X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="2182705" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 23:28:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="912113130" X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="912113130" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga002.fm.intel.com with ESMTP; 14 Feb 2024 23:28:45 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com> Cc: Huang Jiaqing <jiaqing.huang@intel.com>, Ethan Zhao <haifeng.zhao@linux.intel.com>, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com> Subject: [PATCH 0/2] iommu/vt-d: Introduce rbtree for probed devices Date: Thu, 15 Feb 2024 15:22:47 +0800 Message-Id: <20240215072249.4465-1-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790958319042913586 X-GMAIL-MSGID: 1790958319042913586 |
Series |
iommu/vt-d: Introduce rbtree for probed devices
|
|
Message
Baolu Lu
Feb. 15, 2024, 7:22 a.m. UTC
This is a follow-up to the discussion thread here: https://lore.kernel.org/linux-iommu/20240201193427.GQ50608@ziepe.ca/ This proposes a per-IOMMU red-black tree for iommu probed devices. It benefits fault handling paths, where the VT-d hardware reports the Source ID of the related device, and software needs to retrieve the corresponding device pointer based on this ID. Lu Baolu (2): iommu/vt-d: Use rbtree to track iommu probed devices iommu/vt-d: Use device rbtree in iopf reporting path drivers/iommu/intel/iommu.h | 8 ++++ drivers/iommu/intel/dmar.c | 3 +- drivers/iommu/intel/iommu.c | 91 ++++++++++++++++++++++++++++++++++++- drivers/iommu/intel/svm.c | 14 +++--- 4 files changed, 105 insertions(+), 11 deletions(-)