Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp65079rdh; Tue, 6 Feb 2024 19:48:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2OvdN52kcHV+VASxIAF3zkweGe2LBRl7DOOpSU8RSqX3en9NwhN8kjU31uijRJt+T6v0g X-Received: by 2002:a05:6a20:e607:b0:19c:7560:e7d6 with SMTP id my7-20020a056a20e60700b0019c7560e7d6mr3388705pzb.1.1707277704620; Tue, 06 Feb 2024 19:48:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707277704; cv=pass; d=google.com; s=arc-20160816; b=sLMMb2IgnUQTf1KKMeLvQxGeELHKOjaTHmWaHvIBQDGkKjJinK6QKt6u1EKYmV4L0z b1xcDlamy+0dP2GTJ3lih38YWx6XO29teRgqBLsTKfqVAqR4YSdyaUeXJv5aWzIvtuno WNAchQ9mpPjHngVAM9vOJZJCkxR/TnHNLl/ORDm1mxZyJqZZlheFbj8C77mu5FxzYs/v tn/iWLbnh/UJMHzrFYIEn4QutNx08X1p59eq7rdj1ol9Eqr0h/Uwc5sFg8O+Px30kdRH PUry11BXMFUPgU08yW2a2Q8TjhsyPCHUx1p4d+G9DmXSHtoP/ffAFisxuKtLSqH6gK4z TsEA== 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=0F/4dRZGCh2miT5/99A8Y/A2q+cAoYN2IFFkzJ+Yegs=; b=Xh1v/29pcKTAuvWL/rdLHIRWteO121Ibwl4FlaQ3NE2bb2iKOyiguiE9N3jzX39vpY EuLE73ay8P4wol/HNIW+qktgz4XNccYPZzQ1JYURNLZZkJ74kRUhVAAFNv8fBT/Kzl4f Z9fO4xcld/AHohlXt3saMtF2J4u7BNwX5cBL9ZjTaaqerKY67eH6sw1T0nyAbHffdKko e2+wafQXE2L0b9oFn1lRM9ZS00SLiy4mEszQXRB00Jc+vSIh0xVFA7vp/e+g6IB/bMvA Uf1XlyOjtbTYxiu5A50d0KxvrorkekvCJcA5FdLs8jp5QvRIGmu3tabSvbhxEmIlj8JF 8+uQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=l06FkZln; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55805-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55805-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXvEOin/LSd2mTymse+aDKBDllcsOytCeoCdaoSRsAy1vFMYSMzfdawRRugWl0CKI51nH3hhprq/0SLrTT14lV4cHI1EF1YlphUHZkUCA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d11-20020a170902cecb00b001d73e8bbf45si619409plg.349.2024.02.06.19.48.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 19:48:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55805-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=l06FkZln; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55805-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55805-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 76C89B25C0D for ; Wed, 7 Feb 2024 01:40:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C1D510957; Wed, 7 Feb 2024 01:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="l06FkZln" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 A5CFA10949; Wed, 7 Feb 2024 01:39:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707269970; cv=none; b=lA1ZZaqZIqv/aH1ndziSJdkdeZmxn/MtINtpxld4NOUV4WyvS/6oGHFZ20A1ClUpuG1WnqPirjo5DKaje655zm5f4O0XU9hCbHAXCw3nhk+uPX9zm2+B8JHeEPkfaW7+SD0m9U8I5nv1yLF5yMwvgvVuzZBz0m6PuVJGWdf6NhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707269970; c=relaxed/simple; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kvmF5AznrH642a+8tQDnXNG7Vf8EbdwMqmaUtLzc5fuUnGB2dvr1du+N/PqK9b7r7Lit1thEU+CmPpgZAzLTqSxejGdKsIKXCAy/escqLHMYsnRWg5UZM9lW4LtLWnn9T2zzMG2gkVRdGU9VToeXkFlFUylSU7byeplfHbTExR4= 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=l06FkZln; arc=none smtp.client-ip=192.198.163.11 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=1707269969; x=1738805969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; b=l06FkZlns54JrH/is3Z8roJ5AEZquvWLewBcx9iITVf0GUZ9UOHhB8Ht 9X/ETmpW6i3cK8HJf2Se6nHuqmP6stLCzKiNTmDTDN3HZhITmlCSMZGyK er4WafeiEqAhIXSmyH/QyfaUWF3DCzC7/Hull2RQSMaa075asz72QOVFU 0ECEj0Fww8QXvoYEmYsLiWTdXczmx9hfEMt0jvDrex3aoOBVkghpXrlHP jdHg6grhHFCkElfyxq+fCtUz1EJ3BGeobzszriSOCjDi5tfdKzhlOrXFl F7/rkIyNdCmXGlnjhFvyyJN0jKDlKka+HGIzpTxl5OlKY7EX+wFo5AtEQ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10976"; a="11534012" X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="11534012" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 17:39:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="1190595" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmviesa010.fm.intel.com with ESMTP; 06 Feb 2024 17:39:17 -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 , Joel Granados , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu , Jason Gunthorpe Subject: [PATCH v12 03/16] iommu: Remove unrecoverable fault data Date: Wed, 7 Feb 2024 09:33:12 +0800 Message-Id: <20240207013325.95182-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240207013325.95182-1-baolu.lu@linux.intel.com> References: <20240207013325.95182-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