Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1468218rdb; Wed, 6 Dec 2023 22:48:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0j5U4latUQAYx2nc1KhWbPWntiHuI7tycHHqq5PSHyiWNpAijvu1zr6qiSWfWoXeE3TfQ X-Received: by 2002:a9d:61d6:0:b0:6d9:d817:c1a with SMTP id h22-20020a9d61d6000000b006d9d8170c1amr708786otk.46.1701931732121; Wed, 06 Dec 2023 22:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701931732; cv=none; d=google.com; s=arc-20160816; b=qoe8rrUj67ESF0qIF68DSIgPNyKqBFHMeUm/KJV16eL40yxxXZ+7YJkEm9qc+8EYaE 7vXP+JjEquMtbNV+vVsYuCZQeGB7RV4UHLyvss+1ZZasAph4qtXNnfjU/a9FO2q/RsOn WR4R2k0RIWLW4fbNb2k9YQTwcrQ3VgiFppHpLGnnFqd4igdh6rvYqBYsHY9voanGIZAK i51F3BH8JfQRQsiTjrLQy3bLdQWNbL1Z0kDeYb6AwPgrw+Y/vblYIn9a2cPVCY+cK907 OvP0DIOxMEjMU1l+VG7tk4YfhqRsea5Xbo5vVcUYCjDaqFBZNCoNZkM1wJnWPeySFk6C y1Kg== 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=iTQMIjYfgD9UenibIEnUxI0kF1GnpNbGezj9V3ewbLM=; fh=0puWr8qDwzaogZbtOaymnvHkPoKpvOitlnMkTa2cyaw=; b=akPHekyBIsCdfkUPhTKRUNF1pYcIde/vwQDnRaFNwqFraiKOovDHKFIi1RXwSMAAQ6 CriW9WlCe9Ulg0rT2aA9huObZno58XTJ0AyDFXdh3HpAhbgbfu3PpsEoIdxXXSsDjr8K wss2eoO3mShIOHaGMpkTyMomkFCelnp4qgMCjKcWQx3llWSEyWrKrSB1m86Gcr8BCHDI wC21XuGDw7iycEPsop5CPWPGKtNZI+VSLAT/bGgTZhRQ5ar39QBupz0JjrkmXQ0ggcoQ ClmX0nuws7SImYfD/hDcj4GDUe8nNXOHx8eIgtQ3nkQo2r311gnY4g3iYWooyft61DhS elOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hVOBXHxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l190-20020a6388c7000000b005be0f40b55csi632643pgd.488.2023.12.06.22.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 22:48:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hVOBXHxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 937BE80BD515; Wed, 6 Dec 2023 22:48:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbjLGGsM (ORCPT + 99 others); Thu, 7 Dec 2023 01:48:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377638AbjLGGsI (ORCPT ); Thu, 7 Dec 2023 01:48:08 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72F5310D1; Wed, 6 Dec 2023 22:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701931693; x=1733467693; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=weytwHlJaT9QkpiPWOupsraUsDXK0tGZy4jHhXFC/0o=; b=hVOBXHxJ3F9ZWDeU8C0Paq3Vo/c8Mk8RCb6tvDd6w8/t39a5qIQVegIr IepHU6Uxg03MKCEQi3fUtW7hOUPwbIFwd/9OgI7ANwuZy3qTpkXQL6++A 01FXydMaHfQMrw6hIV6MOX86lvgwxU2xbY/Nl7Y89g53RPYNIqsbGlXZs 72nq9w58XOIuxcjPFzwMb4mKgJViOzl3w/Rn6mCHpX6VscMVqAsBis+vk un0POzJ2okKm5ZFezQOqlMXr9j23rnfvhH2DzPKlbexciaSMpfyT7pByp /OuP16+l9CVxjZzxlJR2KnsYLYiuPSwe3dxPDM7M/U8U9oLBLotkcqkWS Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="1014914" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="1014914" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 22:48:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="771611494" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="771611494" Received: from allen-box.sh.intel.com ([10.239.159.127]) by orsmga002.jf.intel.com with ESMTP; 06 Dec 2023 22:48:07 -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 v8 03/12] iommu: Remove unrecoverable fault data Date: Thu, 7 Dec 2023 14:42:59 +0800 Message-Id: <20231207064308.313316-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207064308.313316-1-baolu.lu@linux.intel.com> References: <20231207064308.313316-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 22:48:48 -0800 (PST) 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 d683ebf152bd..c1e4369b1957 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