Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2500978pxp; Mon, 21 Mar 2022 22:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBnM99zzQrhwxWH1PlDVTAQ98AJt2PHisO4SKdVZqBP/GGfuaZDfZPbWKOhlGCmRPfTKaJ X-Received: by 2002:a05:6a00:ac1:b0:4f1:29e4:b3a1 with SMTP id c1-20020a056a000ac100b004f129e4b3a1mr27282486pfl.63.1647927925008; Mon, 21 Mar 2022 22:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647927925; cv=none; d=google.com; s=arc-20160816; b=oY6vSsn8OCuHuiwHtyD6390XnNpwKLdHe9yUVttahkPR15fcmnFRDDCg14fgSAuNxE 58M/l6sr7NUe7RtLbqftwk8M+LtSQeOd+QyOATgla52sKKQumQ7sDyIbw5msfGMCnYwF oxi+3GUWySCpysRSN86uQkE/k94NXENi5Yw5MxhXS/wTQfazhlUYmusRwBOJp3snRCbI f2pFQKLREpO/gmZk7c1DV+AhseE4nDuLM4nGH+Wh9XspjBu8dAYmfzGm8HpNjuQvyrJY 5iDx4Lf8kAHuu5LyaXR+Fg2SKDS+7L3BrTnQscif71V25jGUcV4Hvm5sM0XRcNzEb3r6 8WYw== 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:subject :from:references:to:content-language:cc:user-agent:mime-version:date :message-id:dkim-signature; bh=FF0A2ZuzAXsWOrel6pKN/T++yDATORSun7WRpgzYK58=; b=FNZLgUTw32mg5doCDPJuDBf1VbU+UfBHIJpHMcHwyX22gjrURwBQ09sVFstTaJyu2J hSuOYjqrPK1dIkhfBnhSXv7nyWSGwePHStPVN+uElBE0ymhACFy3OGn6UZgFXno7HfJT QO6djJFSqepq8hY4mlDeT8+LfJ5lI819Ot4jpA2TjmWcpZI4RqRgAXTarmo/30K67oQk p0o6pDAxGDWxcpUHWBwvN7uc/9Y1gRpIAFdB6GIND9lyiM9Owj4k4UfGmjQspdS8rM0Y 7Nh9+N2rh+H5woCxmemvSNgbjVfCk1tudNHzVH1Kz4gRET8+5pVW1e4JU7YJLs0ibPRR WAvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=frr4OiR9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x15-20020a63b20f000000b00385d8719515si411314pge.570.2022.03.21.22.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 22:45:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=frr4OiR9; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 62BA0205E3; Mon, 21 Mar 2022 22:03:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236659AbiCVFEz (ORCPT + 99 others); Tue, 22 Mar 2022 01:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236525AbiCVFEy (ORCPT ); Tue, 22 Mar 2022 01:04:54 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C5B167E3 for ; Mon, 21 Mar 2022 22:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647925405; x=1679461405; h=message-id:date:mime-version:cc:to:references:from: subject:in-reply-to:content-transfer-encoding; bh=9uqPM+FOjSZGcrtq3DsRrRPnxlYdv1cSjJxdC+pFnns=; b=frr4OiR9KcVGxYtDeg5f3GJ70a1K6xZ8s/bhqoi4DEPSDE2U8V1FP7Xq 52G7HYLwG9IP+8qxbXnEJxC7350bGZCunTN38Ejx3jRZxDLlUntBZ/3qP TNiMQc0KIKjZZMD0f+6LPLr707LZY9UgzKoVkVNXDZgofg5Vq/IQxiP/9 XvvQI9Ty6Gc20Dr7jQ6AWPnPt53ZAZW5Yh8hLp9dv8VAs86E9FlRF1E2O vIvQ+JLK0qCDW14jGqCJrh4QpTo2fDhGiNFSwchhix0094RFfua54dW5Z JQOKpzxv7oW6o+cWGUjz7bEiuzwWddO9O10sy4HJ4ioUaXB+VN730crz3 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10293"; a="238328222" X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="238328222" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 22:03:22 -0700 X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="518728164" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.209.186]) ([10.254.209.186]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 22:03:17 -0700 Message-ID: <64fa931b-ea2d-f425-5baa-654216bac779@linux.intel.com> Date: Tue, 22 Mar 2022 13:03:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Cc: baolu.lu@linux.intel.com, "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" Content-Language: en-US To: Jason Gunthorpe , Jean-Philippe Brucker References: <20220320064030.2936936-1-baolu.lu@linux.intel.com> <20220320064030.2936936-11-baolu.lu@linux.intel.com> <20220321124346.GP11336@nvidia.com> From: Lu Baolu Subject: Re: [PATCH RFC 10/11] iommu: Make IOPF handling framework generic In-Reply-To: <20220321124346.GP11336@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Best regards, baolu