Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4231435rdb; Thu, 14 Sep 2023 16:30:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHW0hhExMVuQjEd/B76EB0H3DpBeIZQN+q9pvqBJglOlBoIO83y8IDtWUsW0vePgtb8/J7e X-Received: by 2002:a17:90b:1d85:b0:274:5bd1:927d with SMTP id pf5-20020a17090b1d8500b002745bd1927dmr4523454pjb.38.1694734236188; Thu, 14 Sep 2023 16:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694734236; cv=none; d=google.com; s=arc-20160816; b=W82fV8lSGlW+94NIuLKdEiQY0EX/P+uugyCtfYhsGXv9neAgE+AOIXWLPrgfjR1oMD 53lDVDpkdraoaxSvYYtBicwX82LlWOMrnpPRykqshYTgwM4fAYLAV4/pQjhE37zuLo1v 1L/T/7Zzh9GSaGQWwF2lo4jdMMDhqLLlu18e37TJPwRMlgz0NYWTHhLDhcZFGOstqMol ChxcS7Z3VrZOXnLcAApMZpfRu11LhU/DXCl1GcPDt7KGBUNAAFET8w9704LwnGF8mh9o jS1ePIUauVgFxqfZF2fKStPZbvYXUeYs2dgp4+NhcUmUEWVFGBzgc7oYLJspBQWRl2Uz ysaQ== 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=abZDBk9Cblzyff+0d/AbBqY4NYK5MlE5bpcCICF1CgM=; fh=JFvRLtRIMZvCnJUsxV0gv79r+wO9Mnl08XOA+KkZDv4=; b=ZJGQuz7Rsc3/9DVR9PXbwkObsMW+EFz+aUQ65HWJPh8JMYP4pSu7sKjE3wT+/vGYnt L+yeQARUx96QU2t0HnludPBhclQ7RUUnY2BA8kvZ1D1mmPZH3mAi6wVs4aByC3iQ8lwo NLVPL8kvNjpIN1gOLbsVRUUHVOljMNOIQ1e7rnBtpDrxFdKVST9iqOYl5fi8AwOK8cfS Iwk2cb3Scht7JvnJ+jxuUHOu8+0l1hb5IBpVi1UmKC2KYAbDGS0b3NithAKzbfCCc4X/ BDS+eTAYZGQGb1mbRjwo+PrkMwFy5CoG6ADlaMonSAWvU7HyxPVfrI5SO+TCbQcGZaKx UQ6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R6TtctXM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id r18-20020a17090aa09200b0026383536294si2264061pjp.175.2023.09.14.16.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 16:30:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R6TtctXM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4CE1B81CEB2E; Thu, 14 Sep 2023 02:00:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236717AbjINJAQ (ORCPT + 99 others); Thu, 14 Sep 2023 05:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236583AbjINJAJ (ORCPT ); Thu, 14 Sep 2023 05:00:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB241BF2; Thu, 14 Sep 2023 02:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694682005; x=1726218005; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1mB0Y+KERhzTwiTUZyoz/Hd7O5Mr0RrQQDSegOTdUTo=; b=R6TtctXM5579zPwrCD7BU3izcn/eePeYAOf7v2n6sz37ucmeJl6ozjAT 116PVSxt3+Xc9beEDjj1APSuXPBwQzE50JHti6lTKZj5lKP21I7GXvji4 SWGGPfpC76YkNpgPVeW4uoyKL0t8xSgPW4fOHqj8K8exlVwMrgVWbg44E lkEjUi1sZfLvzlJvOviP/l1MCNrJQWsKV5dwSBq8NTjLxLmzTYmUicCoM slXbpGpAmnHIoKsuXuhxz7Ryi3JaczZgC4TS9XTEZnHhh0blrpEtTfUj7 hzGGKFGAGokf7zEESmHvbz1tftqWwfx+/x+eLv2i6o+1/FB2kUA9lRrrN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="465266320" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="465266320" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 01:59:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10832"; a="859612766" X-IronPort-AV: E=Sophos;i="6.02,145,1688454000"; d="scan'208";a="859612766" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmsmga002.fm.intel.com with ESMTP; 14 Sep 2023 01:59:51 -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 , Jason Gunthorpe Subject: [PATCH v5 03/12] iommu: Remove unrecoverable fault data Date: Thu, 14 Sep 2023 16:56:29 +0800 Message-Id: <20230914085638.17307-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230914085638.17307-1-baolu.lu@linux.intel.com> References: <20230914085638.17307-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 02:00:31 -0700 (PDT) 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 --- 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 895405567f86..1040047982aa 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