Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp586090rdg; Thu, 10 Aug 2023 12:18:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZCDvtag8Ee3SfE7jPBq0HMX8a7ko/FRH6xPWAiLl9948bLnDYGIi+57qJVXyUtVDGkCtc X-Received: by 2002:a17:903:26d2:b0:1b8:6e2e:78cd with SMTP id jg18-20020a17090326d200b001b86e2e78cdmr2927689plb.40.1691695117231; Thu, 10 Aug 2023 12:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691695117; cv=none; d=google.com; s=arc-20160816; b=S/zzitEbwG5PRk3BYNYG9O02qF/ke77BaDpcLO3TLxShGor4Xx6aNKG9g5HOAaQ1DP iRojrfFzF6RgrjBXuyxE0wGAgdLVpA02jiAJL1mqrAAUk1zlc0FOPoTlxw11MbAKFZgF mLO63aiE/OwJ0GBiUj5HjHktR9Mp00dr2vpPB40Lo+nb9IxfNnksB5u78ISx031c3vax YQlcMzAZkjiEh9t5VB85qu7/e/nomObSjGjrwCbP+/vxeRy8bXHCGSfuHZt/989zJgn0 A504AnD3sWusMp8/ri00qdz6XYvh4FXQCvq5PI2KDb2wVoPdMVzszjqk/mP4esham2Wt 4Mjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JMdp77jhwQvRcl315BSI++IxT1Tx9GaLgh40mJ/tAaA=; fh=FROtWkHcmTxsik+/ln5NelbIOlFcfMWoBfzDbH+Lmak=; b=Fjuh3Dpkc5JSdE3Sg8HXPmrEEH+DK/ECggSG+kawKbXLbbozkrV01hvf6WhmwA/CHt mwkIrbL8yYCWwhVYHp5oalwwW4HqC4Xv8EwEnKJtfLmbPeYAPCVfTvbOV4s6gU+mL4kU vgcSsPrXjY+Ictu/yVd/FAO2S68D5M2VUB76jnvzspkS7FXZWCfnsAVfB7g5yGYoy28I dRobT+T/GqlVCrcDeLm/r/EffijMqB1MtytoH+9O085XSC1FqKPGQMRA+nu3fdzjXHgY zQxyqQzUxRPbCH98fCgkh04VoS6CoEvYziv/L1vYeyNi3rK4O56gNfUEytsOn6Ics08t 53KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=XgY1GFMx; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky6-20020a170902f98600b001ae141947acsi1834088plb.183.2023.08.10.12.18.25; Thu, 10 Aug 2023 12:18:37 -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=@ziepe.ca header.s=google header.b=XgY1GFMx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233705AbjHJQq3 (ORCPT + 99 others); Thu, 10 Aug 2023 12:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231643AbjHJQq2 (ORCPT ); Thu, 10 Aug 2023 12:46:28 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D98B390 for ; Thu, 10 Aug 2023 09:46:27 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-686ea67195dso834898b3a.2 for ; Thu, 10 Aug 2023 09:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1691685987; x=1692290787; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JMdp77jhwQvRcl315BSI++IxT1Tx9GaLgh40mJ/tAaA=; b=XgY1GFMxDZl3teOz42X6UjqkluiZg/uKErMnjqTIM5rvepjjsiaFeJai7WPmjDbm23 90hN2MYy9mOlOX7CRvcheExTVUo+FDhygE76i/MCEjL0KeQIeEiSgOC92wAkDZ+6oUTj kfQj/fws8sgY3uZJbz/rFhRrGAOcg2nCYgH7zRMp6cxhVqtJttBtHiy6/MVpNojdoDJQ zy5H6tPr2h9qXphV1DICqMWO3H0RL6zfUsD1ZIM2X18or2uuUykq50tDIUNude51aQV3 Cwi09gaWtU3Q+0iNV0KOFxyBEhDK3AXf06PV/DKqwJgUebLzFflPgu0UuAVf6DJ42X87 04cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691685987; x=1692290787; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JMdp77jhwQvRcl315BSI++IxT1Tx9GaLgh40mJ/tAaA=; b=TP4Px7cYy1NYtgynT0b0/fdWQjB29W+gwA/6EHIc3SEvgjBU7O7vh+F+JsFXnSqexa wAlOJb+2sj9+kOOPPiwzWSkMFbuj/RisLVEB8yFQElYQSIf/PAEei906DshipvNaJk6G ayEs6G+JeoDqUeRrTrdpnlPMMQujfNmIZRiBSYT2O1L6auwyEWCLX13n4zo/dEP/Ftyb o4UYKDiF2ElUz3xUoD0moxfyaT/nNW3ht6fORIedltFSdrj/7Uj4NgmKrMXNzlOXT8Aq LGE16aBobJ+TuVwaqNplUbltbUYKz7E6aA9IZ2EEbq0ykUDo9J8DrcpNI4hb6/mEMZeb MxCg== X-Gm-Message-State: AOJu0YwzhiFGZsMc+AutLAnkRhoq22/I/AOolweL7VUkFPbxS1pNsTqf mylPMylVKCffIlEfl6lP4Iq17g== X-Received: by 2002:a05:6a00:2305:b0:668:99aa:3f17 with SMTP id h5-20020a056a00230500b0066899aa3f17mr3362615pfh.16.1691685987356; Thu, 10 Aug 2023 09:46:27 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id b15-20020aa7870f000000b006871bea2eeesm1753718pfo.34.2023.08.10.09.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 09:46:26 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qU8np-005H6d-0d; Thu, 10 Aug 2023 13:46:25 -0300 Date: Thu, 10 Aug 2023 13:46:25 -0300 From: Jason Gunthorpe To: Baolu Lu Cc: 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 Message-ID: References: <20230727054837.147050-1-baolu.lu@linux.intel.com> <20230727054837.147050-4-baolu.lu@linux.intel.com> <28d86414-d684-b468-d0a9-5c429260e081@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28d86414-d684-b468-d0a9-5c429260e081@linux.intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 Thu, Aug 10, 2023 at 10:27:21AM +0800, Baolu Lu wrote: > 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. Avoiding walking the page table sounds like a pretty big win if we could manage it by forwarding more event data.. Jason