Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp973087rdb; Tue, 30 Jan 2024 04:30:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFe3bD9UgiUJvSvD3qUr1ROf5PlEN/QIJo7T3aeqGWTSeASgR7V5tJtitf/mm89d5ShihaF X-Received: by 2002:a9d:3e03:0:b0:6e0:f8ed:7bd with SMTP id a3-20020a9d3e03000000b006e0f8ed07bdmr7671121otd.9.1706617845780; Tue, 30 Jan 2024 04:30:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706617845; cv=pass; d=google.com; s=arc-20160816; b=no9QKVp5TdJpiopK7zf+MU6P5mMDC9U1KUV3y/lnN59NDWGGfX1jiKAHKQnkV5W67E 7HLZLADXDZc7U3eWHeXiZr/YfQByhZA5iN2Bl7JqdEiINAzKc7XYZX9d66UNK+PJpJV+ 0paqkQxXAbs6YyYX3Bfe4JCgwJWy7VNIhsGN7DOZ9mOE1aJYrJsYxqVL8pLCTu9NaCve JJ6UuryvKStbO51cLKP71kLUMoPgwgtjfOO8NyFwc+/nZRj4caqz3YG0vtlYkokFKgIU GXJK+DE+kTj4domPU0JooyB9DAqlKKHpD0HtryUEwambD3hTj0yeNByIxYy8dhFb+4lY aLfg== 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=oaHNS1xUSnQss3sOwgE3xgF1EHmYE8WzykuHrV1+rzg=; b=aKloBEa6geyAZp1Zatfmp3EM3raX46KnEngkXAIKiRUR6ajlaTnYl5WGA0/b+tWy/I syLJpQH1J4T4gof06qWFlk62MCwvfeowQb9NbF7rL6zp8VUTR5CiVuoUYODnwPE17RwX tNWv2x8e3gKsCWuE5HkI4aAcxhwPtnIn3Q6luXzeApdmyBpwWcsHG5Qh/j/ElUymwgLs yAFxdYRmwfsIaGPP9DcpsdE+tucB3r4CUVD1RhMzSdPQ7QgJDo2/RME71DZ+yCzAGvnM Mf6iAFWlkuTwBJmi6ETua/tLo9G5Py45mOBtVKgOWnTARVixUhkY7re/tjdmc22l08x3 +bUg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NAg0Oxxk; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-44105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d7-20020ac85ac7000000b0042aa9f01824si3490575qtd.737.2024.01.30.04.30.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:30:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44105-linux.lists.archive=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=NAg0Oxxk; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-44105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44105-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C8A241C26082 for ; Tue, 30 Jan 2024 08:15:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65D1459170; Tue, 30 Jan 2024 08:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NAg0Oxxk" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 1C25758AAD; Tue, 30 Jan 2024 08:14:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706602464; cv=none; b=Ef2NZJY8dNyopsxvCAn4hSCnS1hYr98zWTCMjaMKCxXSuy8dyizl5U7HBLXemuYzRia82MXinyWubxGONGBFAXFxUrd0hqKKB5Zv/BFA+TsxgIDzriBbe4wgiBzaeqtMYd9IMhEN/fklUCVooZQR6RzcxU4NJtKQT6aIWfFWhXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706602464; c=relaxed/simple; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kmsFTSXGg6vQWUPApoi+7XSiU920aYXwRfv2KSavyGOGK4d1EFujhVIrOS8nYXSU+YF65B1a8Fi9JGMZrAtbf8MwcRYgEFIxpAW3tNi9DHT3mbx7MvN2UNwPaxVQ4ARE4Uqq0CDz1wZQSP3W+eJrgvr2jRZz5kUnmq1qddPAN4I= 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=NAg0Oxxk; arc=none smtp.client-ip=198.175.65.12 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=1706602463; x=1738138463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVzhxvqRR0BI96qQJ4hq4Lg0Tgi2Dc/PHhg3c81/aoQ=; b=NAg0OxxkmwLslXD05K3ztXS9i5aV6dTv+aEbROCre6Oq2nUCyw6qdx6S 44peFM/Gb7RqLKKhpfnoAJ3NbGF2TlQTrRmz91CHpidapUOWpTyqV/hvl nEpJB9qXlSxVbpHjtGapTtJYwGUydW5CGRQ44cepmViz5I4rzw/kCma0y cqlhzc2JYB2tn0TrKKhuovGFtMSlJ0sQpF99JdY5cfvQNDMcglwukA9rj zbiOwQqNevMVmXu2bZK1NQS+PayMInM+WRW/H24KBQvyVMmn46Zzxkyvt 34pcWii4p6PqXVth8SaINZDJmFun7SMpg03URMrtuaKRyN8ZTZtyma6G8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="10588224" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="10588224" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2024 00:14:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="3633723" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmviesa003.fm.intel.com with ESMTP; 30 Jan 2024 00:14:19 -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 v11 03/16] iommu: Remove unrecoverable fault data Date: Tue, 30 Jan 2024 16:08:22 +0800 Message-Id: <20240130080835.58921-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240130080835.58921-1-baolu.lu@linux.intel.com> References: <20240130080835.58921-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