Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3058677pxp; Tue, 22 Mar 2022 11:10:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBcspJ5m6ZeejaZdSB7rZLcPX6JjeLLc7oYqUTilPaxiDMIJ+QJd4dm0OC4u1FmOwTEcMu X-Received: by 2002:a17:906:2695:b0:6ce:b94d:9f07 with SMTP id t21-20020a170906269500b006ceb94d9f07mr27223445ejc.297.1647972610414; Tue, 22 Mar 2022 11:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647972610; cv=none; d=google.com; s=arc-20160816; b=GupvIdN5uNbdOI+AqnZ/oaoSsmn7wyI2YVaewtOVJRJzQ+ANY5Zwa1WJfiRBpzRHfu K6yfQrnVImNZtQ5u63pvEQUjQkFjzVLwYN4W31hJZLXE7CQbb5LZy6CH6LIGCg0b7Shy vvHIrJihIyc4WsHs+t6hw8nXWQTpyMPWCDnWcE2GncETgUxsCkNHG0YTvO9wU1pr5wSs Y/WlLK0/rEtImXmS6+tdw9Sgs4QJqCcG2pBHbHYRQDmWj3bexqYHsgjaVJoY46QUTefC lkUu/hCKY4564xI2+IboGl5rdtDhjnoHWnqJHKn+IzZV+f9Pop9+xCtRUp62sd7q7FiR Rgvw== 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=Jr6+3DLiK22UGPA/4UCdBp/K4JK2YnXWo0BRCRlc9P4=; b=ItB6/vIM42fFTi8FDPLopKtJGDmO2oEP0+729efNzu04KYDP5YqU+BTz/h0ABCxot/ zIdlbth4lIaCmK64khJ5Z+g7F0IuyfqU5uiU0nSEfHy2a/voWmqaSoXRwy3439nZ4wn9 PhFrHjfj+F2kr9uOBfVNsz9X0FmzMkP/F/rwTlivlmFQ8TR0/a/WiGP/4kLkHI4B0tDu riDUQ45vUkYKVY0NNF1VPQNhF0RrYul9b1lsCOGerEypVLlbTig6nYHif95yukP3uqyk XFBVUBCRLgWgFL1YEO//0gkk+gKu7Z1rHEB/u8d91Z+CHIHBLiJR37VETP8mOMbGWjD9 xyGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oua8H4T2; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a1709062b1500b006df76385ee3si9855176ejg.899.2022.03.22.11.09.40; Tue, 22 Mar 2022 11:10:10 -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=@linaro.org header.s=google header.b=oua8H4T2; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232305AbiCVKEk (ORCPT + 99 others); Tue, 22 Mar 2022 06:04:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232181AbiCVKEh (ORCPT ); Tue, 22 Mar 2022 06:04:37 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 670DD11A0D for ; Tue, 22 Mar 2022 03:03:09 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id yy13so35086224ejb.2 for ; Tue, 22 Mar 2022 03:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Jr6+3DLiK22UGPA/4UCdBp/K4JK2YnXWo0BRCRlc9P4=; b=oua8H4T2ABH4Fxb1AEHnQqs0+Nd/DRrkBFpa5TciYJATj1RP0krVsGQpLeZsaxvYF0 N+Urr+Hx/Kh6pC+k2QptfrGexg2ley1p7XYCdfZWE8Ivu73f9AgKKmG7hf8lkXf8bzw/ Z0NpdKYwpTQ+sJ9mMM5PlAZ0202v6wMvFE1o21BYlWi/zNDQglcErQlVwqDDxe4Js9dl fj2WRHeMhjOc4rbk/7y4lwFGU3IDEhGkHDXbNd5e70/+yzvGNxFbETpiUdqHdrImVWZg g1I7jnZOvGlJaiRe/ibZpxZ/cfu/Dupp8Eab0RUVMo1OJaBEk82skw39t9scygaCuyfe 8a3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Jr6+3DLiK22UGPA/4UCdBp/K4JK2YnXWo0BRCRlc9P4=; b=muARSrBiOKoTV5umV6/rIT9j5qwY+5LiP9kEnNwIMGm5NlNnvLCxKFknOipZoAjT/L ST6QKlmGcg162oYt6o9Y4+6H0nYTV2JrOoVvAqDYI6XV89OE96yOUQGOR1DYs90/Polp 1M6Emh0vfE/tOTfdASr9S9LDaDYD8y18AWcHDtZyByWvP2tm1emtZ0H8VbVmrLtuhAJ7 /y9FKhJBlRlrvqw1RVjt1BwhWfTw94MCGTNHqq2o9nffydqT5+61ZlyjEPPZB9UvYE6u bf6HCZWbniRQ9HUL1NX26XiADpCKJs4KZraO/v3bXetf+x6+IJAsYockl4VO3uUqobhG bInQ== X-Gm-Message-State: AOAM530CBgIIgLxcojGs+e0eLhqOFwF4yvlKN5xWSbcyflmgpwSEnMhp XWSKDOzx0NlzAFQsDllbq4oaRQ== X-Received: by 2002:a17:907:6092:b0:6db:ab31:96a2 with SMTP id ht18-20020a170907609200b006dbab3196a2mr23916489ejc.361.1647943386426; Tue, 22 Mar 2022 03:03:06 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id sd33-20020a1709076e2100b006e0339b4a5asm1216694ejc.109.2022.03.22.03.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 03:03:06 -0700 (PDT) Date: Tue, 22 Mar 2022 10:02:41 +0000 From: Jean-Philippe Brucker To: Lu Baolu Cc: Jason Gunthorpe , "Tian, Kevin" , Joerg Roedel , Christoph Hellwig , "Raj, Ashok" , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Eric Auger , "Liu, Yi L" , "Pan, Jacob jun" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC 10/11] iommu: Make IOPF handling framework generic Message-ID: References: <20220320064030.2936936-1-baolu.lu@linux.intel.com> <20220320064030.2936936-11-baolu.lu@linux.intel.com> <20220321124346.GP11336@nvidia.com> <64fa931b-ea2d-f425-5baa-654216bac779@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64fa931b-ea2d-f425-5baa-654216bac779@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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, Mar 22, 2022 at 01:03:14PM +0800, Lu Baolu wrote: > On 2022/3/21 20:43, Jason Gunthorpe wrote: > > On Mon, Mar 21, 2022 at 11:42:16AM +0000, Jean-Philippe Brucker wrote: > > > > > I tend to disagree with that last part. The fault is caused by a specific > > > device accessing shared page tables. We should keep that device > > > information throughout the fault handling, so that we can report it to the > > > driver when things go wrong. > > SVA faults should never be reported to drivers?? > > > > When things go wrong, the corresponding response code will be responded > to the device through iommu_page_response(). The hardware should then > report the failure to the device driver and the device driver will > handle it in the device-specific way. There's no need to propagate the > I/O page faults to the device driver in any case. Do I understand it > right? In theory yes, but devices don't necessarily have the ability to report precise errors, we may have more information. Thanks, Jean