Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp557107rwl; Wed, 9 Aug 2023 20:13:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHBYW2Uq5V6ve6tl9eteLWbmxu03ZsFI6oIrTAxZetAkDi9P5lyHdBSYZ/jjod6SIXRwBA X-Received: by 2002:a05:6a00:23c6:b0:686:5f73:4eac with SMTP id g6-20020a056a0023c600b006865f734eacmr1252077pfc.13.1691637221510; Wed, 09 Aug 2023 20:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691637221; cv=none; d=google.com; s=arc-20160816; b=WDajdtmFpQlMR+OY0tHLe42ZKBlMn0aQBGQLXN0NMr69PCZN8IC3GPloSq89oqb9R4 IHGu8dSOE9r4C1LvbDm5yULKM5nLr8jXkLkHyX0PNWHT9qmLvtXbaBUSsIQMHrVvEnH0 mOMH/tBGaRZ3XinZKaDdVHG26eOqsWCYOAbmF5NjwSOJFtsXtXWvqfohvdYm1TnHhIhs 9VWiDq5TZD/3LHY1xoTwvdFU/URJcD3gkrPPyY6PpiGTsC7aOx5I8OQOVkELwjtyUIZR FouQ7DTYf7tt9HHGXWIA029bLeho1X/V6q3Y9xlIfpj8cY8iHTFAwcyLKE7EYJf1Kn/Z Tfgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=xcoVaTuakz+cS+y/gFCK9Wd9+QlXttrKYgjLo12E0Hk=; fh=r+VlOdz9yHieXWJnz0Rf9gwDu6JsUzRZtfjjcVRKdpQ=; b=lIJiOEIQMk+doxHZdhTc18Cxpm6f3Hr7521ThOXPBf2Osi1H/IWmM4NPlrrtLELQOP VDgkYkZb5/DjJDNjhkrdT0x1kAM8hML/fF4eb5Mzy4TGgy3aiHSbfMmYFocwb6tFIlYO I9Ivhu7+vpmEESQ6/dLriSEkhVYB53erkcpognPD0DbdVdQOKCePbQlRXG0VHR6Zp8E9 hdYpqHYB4orLW2zL7Ho4ZWHkBndZiKCuv3hec3XvAlSk9at+wJGidsBrIdl14W3INKdb H9h+3FkDMurNz8f44spUJTg+BtiHEyYMMbMA7xdFMAVmrgllRNadsnhVZHyvCByClwyQ xuEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a71U2q5Z; 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 v135-20020a63618d000000b00565218f25bfsi630015pgb.319.2023.08.09.20.13.27; Wed, 09 Aug 2023 20:13:41 -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=a71U2q5Z; 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 S229935AbjHJC13 (ORCPT + 99 others); Wed, 9 Aug 2023 22:27:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjHJC12 (ORCPT ); Wed, 9 Aug 2023 22:27:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3EB11999; Wed, 9 Aug 2023 19:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691634447; x=1723170447; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=wbX5ZGZU+a045ReN97N8foV8POn+IQFOPh9KTo/LP+c=; b=a71U2q5Z88nGFR1DCPIJ6xoLbZLbc5u8HUbAtvwsRbQUSORhW+hN4Ctf N4Ty8DyqqgjSiOGHhONfqOjqeMIomXHTdi+jqyAwyO4UEwJttDKtfUD4y CrG693jlPX+TBfyAruzix8T0HczrnkyqarMmZrlFzgT5JR1q13tsIqXbw Pgg7ELgwV7EPC1bAuwHGsjvO7jW3cSiPh6mXEDfwqs+HmqulRs8DxiFhu HjanZuH80j8a4kJ0wv5JJtuISHG3vhnUGhp/F2agi55nwwlX4ybkC7qXt ygUUIWG8xUQdCkUOyE4Kaj53rIkBp/uD618F9ZTYhcPN6GkfGZfjXT3yb w==; X-IronPort-AV: E=McAfee;i="6600,9927,10797"; a="356244295" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="356244295" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2023 19:27:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10797"; a="797433020" X-IronPort-AV: E=Sophos;i="6.01,160,1684825200"; d="scan'208";a="797433020" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.214.239]) ([10.254.214.239]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2023 19:27:23 -0700 Message-ID: <28d86414-d684-b468-d0a9-5c429260e081@linux.intel.com> Date: Thu, 10 Aug 2023 10:27:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , Jean-Philippe Brucker , Nicolin Chen , Yi Liu , Jacob Pan , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/12] iommu: Remove unrecoverable fault data Content-Language: en-US To: Jason Gunthorpe References: <20230727054837.147050-1-baolu.lu@linux.intel.com> <20230727054837.147050-4-baolu.lu@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 On 2023/8/10 0:59, Jason Gunthorpe wrote: > On Thu, Jul 27, 2023 at 01:48:28PM +0800, Lu Baolu wrote: >> 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(-) > Do we plan to bring this back in some form? A driver specific fault > report via iommufd? I can hardly see the possibility. The only necessary dma fault messages are the offending address and the permissions. With these, the user space device model software knows that "a DMA fault was generated when the IOMMU hardware tried to translate the offending address with the given permissions". And then, the device model software will walk the page table and figure out what is missed before injecting the vendor-specific fault messages to the VM guest. Best regards, baolu