Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp285190rdb; Tue, 19 Dec 2023 17:29:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ1Nm/8VR1JJmpqThCSlrbBJfqVRpvdOMmz33Xq3fvTwpw93W2VUJaLpoGCYJs4npJu3Pl X-Received: by 2002:a17:906:13:b0:a23:55c7:7420 with SMTP id 19-20020a170906001300b00a2355c77420mr1811297eja.154.1703035785909; Tue, 19 Dec 2023 17:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703035785; cv=none; d=google.com; s=arc-20160816; b=VI5OBazoI7mcM4B/fGgMelUNq2aEyoMR4adeb3lFA0SMh9ojhrj2lQ8hYsWlR9WnBQ kL+nk9Jbw99sulrdBA5Yx8f/omcWi5plhIPejocYldW/+Ih3tjjOJQRDdYr6DEotUr0s pVklU2vSdob+Ot5vyETMmpXm1RIpz285QpAoX8jWqbZPdsoRidiXpwTCN/NhZ6ZBJwFe Vrv6puWffCkHchgt9JVdXRmP5honSS/O3VJn6YRBgcaISHKayQYEtVjykrd/75qw6uvs s0Q1DM/I76fb/RpLnTWDE4a6OcZjnUONk9mKFw86jFecWj9mTlUlVC0SyQXMm2dMk86n OtDQ== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dM/YivZ9n5ZoqZAQElbUInX1Kyfl9FpmbtFZ6CAaEnQ=; fh=0puWr8qDwzaogZbtOaymnvHkPoKpvOitlnMkTa2cyaw=; b=W3oYrgIDpclDf3uf7xybGciY5IO+S4bZGW+e1QCA7ffB0qKidBRLJW88uWqWAusqfQ TST1Yq0DqRbE7Srcjo9Rh7y99DTINTXkslNiaPBfrQp6cVaV3JXVaIJNjDrCExdB02H5 J9JWo2W1LA7oZVlK+BN7txSgDqv/1iV99f7VqWKspBaG3OGx4TVYV97raAd17xZofuDf bQJ3ev2MwxKjs1wkAJgCKQbKamloFbWM7f+fZORXxcdfkUEEHMGoZ3kops46y6v3UkHr 6gbmwpthrj3yBwLzf6+ZNoq62Rqwmf9vwT9dt75XJtyGHbJbz1CVgxGvnHnRWIdN+LZK 9DfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gr2pHw5s; spf=pass (google.com: domain of linux-kernel+bounces-6237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6237-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n8-20020a170906700800b00a22fb3af196si6408181ejj.881.2023.12.19.17.29.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 17:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gr2pHw5s; spf=pass (google.com: domain of linux-kernel+bounces-6237-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6237-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A568A1F25C29 for ; Wed, 20 Dec 2023 01:29:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1446FBF9; Wed, 20 Dec 2023 01:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Gr2pHw5s" 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 311DBEACD; Wed, 20 Dec 2023 01:28:43 +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=1703035723; x=1734571723; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BLX4zQ7UIi2x2hw/ngzDFRoKaAHe7Rh5npj32JkG4L0=; b=Gr2pHw5sn49iDFiJwgoqSB3MckPyyg6zMHVH9JLoOFuDktuVn1+c5dPE IRX0dsN6APp5yOFgGJdp57XkuJenxdWQN0l20kcMl0F0u5o1zds/L17BV ShRCqLBurdLUDT4RVpIR/bqqmKDhzkusyTf/CPbGR1NHAb4IqJh+hujtO Zab/9HZqn19Kx+NLVVkcPpGGDx0cRP/F/idEHe0LB7zknedN8sBMmG3jy vIPVp6tjFa4ouc+bz6M9TogXY7nGLQbv2wxgYwa/lNIlusXq3VC7qRrFN iQ/2bJIpGwLxtV0+aoqvwvsLoGWF/W/0IroFUJ76+Y9gRgdwSQHhe/oxv g==; X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="2965745" X-IronPort-AV: E=Sophos;i="6.04,290,1695711600"; d="scan'208";a="2965745" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 17:28:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="1023319076" X-IronPort-AV: E=Sophos;i="6.04,290,1695711600"; d="scan'208";a="1023319076" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga006.fm.intel.com with ESMTP; 19 Dec 2023 17:28:39 -0800 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Jean-Philippe Brucker , Nicolin Chen Cc: Yi Liu , Jacob Pan , Longfang Liu , Yan Zhao , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu , Jason Gunthorpe Subject: [PATCH v9 03/14] iommu: Remove unrecoverable fault data Date: Wed, 20 Dec 2023 09:23:21 +0800 Message-Id: <20231220012332.168188-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220012332.168188-1-baolu.lu@linux.intel.com> References: <20231220012332.168188-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The unrecoverable fault data is not used anywhere. Remove it to avoid dead code. Suggested-by: Kevin Tian Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Yan Zhao Tested-by: Longfang Liu --- include/linux/iommu.h | 72 ++----------------------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 80dfdc40b267..2d0ab1c3dce5 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -50,67 +50,7 @@ struct iommu_dma_cookie; /* Generic fault types, can be expanded IRQ remapping fault */ enum iommu_fault_type { - IOMMU_FAULT_DMA_UNRECOV = 1, /* unrecoverable fault */ - IOMMU_FAULT_PAGE_REQ, /* page request fault */ -}; - -enum iommu_fault_reason { - IOMMU_FAULT_REASON_UNKNOWN = 0, - - /* Could not access the PASID table (fetch caused external abort) */ - IOMMU_FAULT_REASON_PASID_FETCH, - - /* PASID entry is invalid or has configuration errors */ - IOMMU_FAULT_REASON_BAD_PASID_ENTRY, - - /* - * PASID is out of range (e.g. exceeds the maximum PASID - * supported by the IOMMU) or disabled. - */ - IOMMU_FAULT_REASON_PASID_INVALID, - - /* - * An external abort occurred fetching (or updating) a translation - * table descriptor - */ - IOMMU_FAULT_REASON_WALK_EABT, - - /* - * Could not access the page table entry (Bad address), - * actual translation fault - */ - IOMMU_FAULT_REASON_PTE_FETCH, - - /* Protection flag check failed */ - IOMMU_FAULT_REASON_PERMISSION, - - /* access flag check failed */ - IOMMU_FAULT_REASON_ACCESS, - - /* Output address of a translation stage caused Address Size fault */ - IOMMU_FAULT_REASON_OOR_ADDRESS, -}; - -/** - * struct iommu_fault_unrecoverable - Unrecoverable fault data - * @reason: reason of the fault, from &enum iommu_fault_reason - * @flags: parameters of this fault (IOMMU_FAULT_UNRECOV_* values) - * @pasid: Process Address Space ID - * @perm: requested permission access using by the incoming transaction - * (IOMMU_FAULT_PERM_* values) - * @addr: offending page address - * @fetch_addr: address that caused a fetch abort, if any - */ -struct iommu_fault_unrecoverable { - __u32 reason; -#define IOMMU_FAULT_UNRECOV_PASID_VALID (1 << 0) -#define IOMMU_FAULT_UNRECOV_ADDR_VALID (1 << 1) -#define IOMMU_FAULT_UNRECOV_FETCH_ADDR_VALID (1 << 2) - __u32 flags; - __u32 pasid; - __u32 perm; - __u64 addr; - __u64 fetch_addr; + IOMMU_FAULT_PAGE_REQ = 1, /* page request fault */ }; /** @@ -142,19 +82,11 @@ struct iommu_fault_page_request { /** * struct iommu_fault - Generic fault data * @type: fault type from &enum iommu_fault_type - * @padding: reserved for future use (should be zero) - * @event: fault event, when @type is %IOMMU_FAULT_DMA_UNRECOV * @prm: Page Request message, when @type is %IOMMU_FAULT_PAGE_REQ - * @padding2: sets the fault size to allow for future extensions */ struct iommu_fault { __u32 type; - __u32 padding; - union { - struct iommu_fault_unrecoverable event; - struct iommu_fault_page_request prm; - __u8 padding2[56]; - }; + struct iommu_fault_page_request prm; }; /** -- 2.34.1