Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp242421rdb; Mon, 22 Jan 2024 02:43:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOGEBzc55Rt7p4KBXOn4+mxy31cx6b09/yBBPI5L6MVqUiK/smOkiZ2hOLrAlufVt82sWU X-Received: by 2002:a17:902:ea12:b0:1d5:e4b0:b27f with SMTP id s18-20020a170902ea1200b001d5e4b0b27fmr2084184plg.52.1705920200127; Mon, 22 Jan 2024 02:43:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705920200; cv=pass; d=google.com; s=arc-20160816; b=rgcvlIcKEXvXWlfB6IWx7jyjmvyRRT+6wlPJRqG2OM+lK4q2/S10QgDb3JGpzNvgGs N9owMQkiKMYTLW5sO9cf9DPeo1tnGRE+u4BiaUIzaVV7wMUL8iH6l5mz3WFgfLxMp1rg jsmQQ2n9vUhon/TUQISrT4c/bBCx3aYvIQ5BuRSumwZuKtJ0mhZKa1PjpxQQ9/Wl+aSE OggSMcYpMM7jFgkbFxvrbDKDvLRb6yHZjYf172E3DciImzXjn17MbSzmOqbT78mjzLZx vDZHcfgjiFwh7jgjOqVkpydygECokCUQt1Z9vhPnhLxttrDA/1I0asX3cZsCRWA0GESW ps9w== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=84pihd1GcODoGB5DbIneUg67qy1cohd+Zrz4LIi1KWY=; fh=0puWr8qDwzaogZbtOaymnvHkPoKpvOitlnMkTa2cyaw=; b=VFSGFXSPGB/QUD+DMvZ5PHX0RqtpS0nMSnb+7usWbh8lUs1WTAYVFeTMRPbYoPRYcI eQMBtelhO4hnkqhsZom6eWrMyZ9RQW6h0bUthLvNGGdT8110TNOJcqIponihSWm5JplS cxLH4lpJx26iEsijc6H/N966vw1qoysJH/kBCvSfDnVbsRP8AuCvav+IBecZLD/oVaXK esxQdCxgbjTDc0Qt3UQOvj7jiGXs69FdWIZwzF/5U//WNnibyhxrFMzP5thSEHQW2a8e cXNXc/mONdq9MuFb0k/aqEj4nBQM4+/3uFQMKxhLxHgzIG9mhb4grVo2jvJzOhZwojz0 +YHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="M/p6gTnQ"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p7-20020a170902b08700b001d733d03e6esi3423723plr.648.2024.01.22.02.43.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 02:43:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="M/p6gTnQ"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32348-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 93AB0B2313B for ; Mon, 22 Jan 2024 05:50:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29C5911192; Mon, 22 Jan 2024 05:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="M/p6gTnQ" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (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 C65B2FC14; Mon, 22 Jan 2024 05:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.134.136.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705902528; cv=none; b=ei3tdFQtbZdkhl23FTHp0sq5lNBU86nmKBp+NnvNdgqF8ynvkjB4TWmkxjFQSWBlFcnWbomkxUGb51P0L+FzSoMyjOgy5oJwc1rytZwAxRTZG7MPVpzgsnlkERTIDWA/2EKH1cOuDXB7od+ufpTIe6pa52czbEYeVcY2D0YR53s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705902528; c=relaxed/simple; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p2PnDaq/43npbcdny79dh5DnDuFejWPLOjkZujnJsCG3Vn6Ru1NRvi8gL9TP9lc1HMkYXJp2OwlMf66DAlTLFlkcLwWNvm7g+lfrqkVd8lFo1cpQywsGdqM+PDU9mTLvbSKkVtSW1W0gZ6dKdqroqjSwA3Rt2+knJqfxcNwh6zU= 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=M/p6gTnQ; arc=none smtp.client-ip=134.134.136.100 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=1705902525; x=1737438525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; b=M/p6gTnQMT+Zdu3ub7XsTOKq0qH4LjanyWsSNhhwCyWRMtUbxkhBqhpG 6MZpx3nSqcX1K2hG699DiHhfLVrT7NCcJZn35aRS5BIABtTbnlBPQIRoW BBHejs1/dijzsSAe8nxOJExtIbnZhe+7LnCwudv7ugPKxSqkfUPs5CBU4 spBsU5HiKjL6SbzGnx6FIMl/kDazzDeqkzl6pU32Q2FiixXI8GvCi+rrf 6aIm0vQPYsY6UB7esMGa1kSm11MEA6f1ZjXqjV0Q3sVxBuRrQqTXSRaus MU8Qdmw2k1/OmACpYIJcmAVOb1gm2F4UP0QPd0WCrQrk/WMYCjuXhgTtR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="467487074" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="467487074" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2024 21:48:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="1116763888" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="1116763888" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga005.fm.intel.com with ESMTP; 21 Jan 2024 21:48:41 -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 v10 03/16] iommu: Remove unrecoverable fault data Date: Mon, 22 Jan 2024 13:42:55 +0800 Message-Id: <20240122054308.23901-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240122054308.23901-1-baolu.lu@linux.intel.com> References: <20240122054308.23901-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 472a8ce029b1..c960c4fae3bc 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