From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAC2BC41513 for ; Thu, 10 Aug 2023 16:46:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233560AbjHJQq3 (ORCPT ); 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-Google-Smtp-Source: AGHT+IFF/d8fCJaxRw5PJDuRon+tGXvjwpsZXLOglZ8RskEhE9kyxcV6qwckv9qPdLj+bfxpXnUDgg== 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> 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