Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1957700rwb; Wed, 26 Jul 2023 23:12:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMKDZE8SmUC1FZIL0LmjoEJokHrRKodZy+cy+U15aDV4UahsKu2oii6JMi4kADUzSWmEOu X-Received: by 2002:a05:6a00:3a2a:b0:66e:4df5:6c10 with SMTP id fj42-20020a056a003a2a00b0066e4df56c10mr4542916pfb.34.1690438333695; Wed, 26 Jul 2023 23:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690438333; cv=none; d=google.com; s=arc-20160816; b=rlH9r0VHWo25BUKiOSG5FWlkoTwk23fUshYdNaCvPRIcgqxG6JiytVGJb6nYSxLHlS eZfOpS4sqaoQypa/ESgd9AQ5A5iPb8+zf7DKkE55Ee2QOt4lq6jqKuk/RjtogTYFs2d+ aeUalXEatLbDRFBmfzyM2+nQSswjXoXqTBx7TO94M66pcEGLrvPa14Qi2rI30fZReHdD 8cEeTvUyZOUkKjZe0gO6yAujj+UZfxeD4WNbqlOm70cTokmxcG53AH3JYxNICcbN/yGD eyPs4IxQsmA/o1aHHXfnyfNQ6w60NkAwaSXVB3HflL1q2y9mVj6+Ttqm9hxV83Q/CkVM f3iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sKntUxEAzGSEAVF55elSO5cPTFo23J1paIU+HKNw3j4=; fh=5v0QJkujOnxKSzhmeWiMX/0q9X35NwMz+SRMkKa4moc=; b=zZM8TWBCyYkozsCSHDxJnyQ33nDFk1f5nrwVpWRRNxEvtuR+sadRSWHlFsB9XV0mJT I7uU4jJZ6FlWYDLOPyZZv+4LGYYj/Jroicocn7Dk357bhYVRa9BA7xaKZf5ZyQVHZjfS lpN5De2GR9Jp1BI70V1YzCf1Ap3IZYCoA+WrR5iHabSCsUVEjZCT3bOg0eAWSqAE/doe E0C7KDhKlfm8HB9dr0t+gn8Hz/peClRZOcA0MmR04Bc3ZjWjWniBSuyaX9lCdBS8uyy4 /eDLcMg8BfCaaAuLCy94QAL+7lzSLdZVdcDcNm1we3bq6YftghnimNFPBW0fYbqs/UyE 9iPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OoLgFOKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb17-20020a056a004c9100b00675807330d0si164166pfb.351.2023.07.26.23.12.01; Wed, 26 Jul 2023 23:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OoLgFOKh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232570AbjG0FwA (ORCPT + 99 others); Thu, 27 Jul 2023 01:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232557AbjG0Fvu (ORCPT ); Thu, 27 Jul 2023 01:51:50 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B032D67; Wed, 26 Jul 2023 22:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690437084; x=1721973084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+30pZB6ZPoSheBWZc+jWeqUw2NgcW/Yd0m8xdMKPZyM=; b=OoLgFOKhCXF5oBPDSciBGj3Qhn+8xQmemJZtPAczCvXvJeIqXacvzF0n bq9TTn6H7vMihWATj8m3ICiUJ/Q5Qsw/s+u3EJ/YVYgsLjNfoTMQ8ASaZ hI7J52Ph54jmoWtYGPYhnCv3zaO6W+CTiSKJwY99Lp3JNo7PGCkSqoMVx clc8AVL7krgAQUuyddrNRzMlVT6BGF+TTV9AF/YdKMRVmmO8wngaS4GT2 xewphWzV0UJGVPtAQXT+LJZRiVbZJCBW5ZPBEyWWLy7wjryYT7Rydj7Fo rMQHdMkWGbZ3deI20I49KfKjmA8phWV43g4bQJtRTv/6HbneAMpWzrMvH w==; X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="399152507" X-IronPort-AV: E=Sophos;i="6.01,234,1684825200"; d="scan'208";a="399152507" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 22:50:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="840585273" X-IronPort-AV: E=Sophos;i="6.01,234,1684825200"; d="scan'208";a="840585273" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga002.fm.intel.com with ESMTP; 26 Jul 2023 22:50:56 -0700 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Jean-Philippe Brucker , Nicolin Chen Cc: Yi Liu , Jacob Pan , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v2 03/12] iommu: Remove unrecoverable fault data Date: Thu, 27 Jul 2023 13:48:28 +0800 Message-Id: <20230727054837.147050-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230727054837.147050-1-baolu.lu@linux.intel.com> References: <20230727054837.147050-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The unrecoverable fault data is not used anywhere. Remove it to avoid dead code. Suggested-by: Kevin Tian Signed-off-by: Lu Baolu --- include/linux/iommu.h | 70 +------------------------------------------ 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index b3537736f9cb..a1e4390d05a8 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -48,69 +48,9 @@ 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; -}; - /** * struct iommu_fault_page_request - Page Request data * @flags: encodes whether the corresponding fields are valid and whether this @@ -140,19 +80,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