Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1965940lqo; Sun, 19 May 2024 07:03:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsG25HPgeWAq+TiJvJnGdEYr5/RCE735nmU72Q9WE1usjU6VoaNSed3nBNs+j+XOdPwY03hGyswIFvm4mnFpeQJrc+v+MP1IE5Ue05Bw== X-Google-Smtp-Source: AGHT+IEP8dM5X0EFujXcLLrYJePdYBEecghNVieqZ3eaumhQiekfEbxQNlr5zz49KUjIdXml54FJ X-Received: by 2002:a05:6a20:a113:b0:1af:a6bb:45c5 with SMTP id adf61e73a8af0-1afde10ac75mr29389865637.30.1716127436939; Sun, 19 May 2024 07:03:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716127436; cv=pass; d=google.com; s=arc-20160816; b=vALPH/1K0BFmYGKKkETsEUYw02m/pbKhrRPlqZsOmEAzJBWceTZR0t8bf3Hld81v5j wfeOeDBWjQW1PjnxdV5oKn5GL7JNeNscYdOm4rjFnItEfsEYjC9zcBudiBrseBswATbs LaBQONUyq5DD3XiADgvJo62dPjWaeayApuA+WdOb/+TIfV5BNDNlTaRaD1YdRqqJh78i vZ7ldpTuW+ptXdQyUFAywTbAzEj9cEmWTiiyynmkGlOYMpJ/nHe5Rl0/IDm2DIVvQAha 2gKlE8KPiyQ1fMYvfYLWe2rp1v/nsuPbNo8tEXAcfDD9kziiw8j7R25UZUKm0BdhzpQT KF6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=5GsqDkYDr4Dcxp/WkSL+uL7HVBJl24fJIadx0ZAfiAI=; fh=oj0MC99jJmXr9VOxYru8PCxqsxVpffpkkk/RjcP5DFo=; b=zeLgaIQ4KxISRMS9KmWvgXZQXGkK/zP9agYRTT4EZNdfDtlT7GmEfUYf7bRCba321O FAY0mEfaJ1WTkfvHBzveSGIm6PVjllkN6X9qac2PbERfbRggkYUkafqbjyhF/G/psZoL dSfW+tDT8g3DWMihwkIz6suFGIvFEtnNKOT1y9cPlzGshwn/3HMvbPm+NFiju5lQcN6x /pHLtxuxGRfX/gU0It0MlqNL9XLYNo+bxXYA38SBbdOmtMM8o7cOb5YdEtsx9QclGUwR wB2w297eeFmaOLLSr38flz+wvTAZUBW2Glu1nWPa4dx1wVYQnvp8UjeUaUKapSQGmYsa Xm5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EWpTMMZZ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-183118-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412863cfasi20084796a12.647.2024.05.19.07.03.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 07:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183118-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EWpTMMZZ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-183118-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8498928193A for ; Sun, 19 May 2024 14:03:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31546482F6; Sun, 19 May 2024 14:03:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EWpTMMZZ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F36CB1870 for ; Sun, 19 May 2024 14:03:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716127431; cv=none; b=aJ38difLKE1w6dZv4xaNeWMMmvZ8hleEPBfQoD2EiM+U1lHq59D8oZ5fKyovi6qSPBH2EwFugy4gHDNlw/NqMklH0YVGlKCH/U32D1xAr7/hk2p1OYFa0fIXpUpfE9yvVAenKiF7o9qZcyO11L8W22VuGkF2G2zeeub5dIDgSAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716127431; c=relaxed/simple; bh=ARmOeQiHP4d/q5mgCSxMdhI46iVoSC/5ft3lev2E/AE=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Kmv18lc9b4CU/IwibEx//KMG80CqNakD47+03y53/aNe30s5giMvFGOzWJr2REF/saRImK96acK9642i/E6cpnH+8qT8J38uutUYBvCTaOIljUhp+cuKnonC10K3IXOvCSe0xK0N3WqAllNvn48x5xGA0PUHhNMQ5W2PD6bnZOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EWpTMMZZ; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716127430; x=1747663430; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=ARmOeQiHP4d/q5mgCSxMdhI46iVoSC/5ft3lev2E/AE=; b=EWpTMMZZhfJH/b+p4xNoCOP+iWov1yBV+suthkdQkiLk9W8D1XfH+bG4 T14ZkxoIa8yjAbxdENIoRDj9wuG1IRyw9Pkphd71Xid2MUdE/nnc4YFxm y0fup0E+4HscvoBc9Qgu/Z8HB8X/7EhHOhCaJTs5Abqfi+Et3h7LZDyPZ iIKDb+4kFuycI25GrSn9MvcMnJpc1e5IXxdnTuUcLRWelPwLPFozrIoxC V8A4oECHES8H3/mv8Dk/RotdyCgNxfPipBNf3WNfQ3QX+AY0Gyz0WpV/6 p9V+GjgWGY2GdBICghTur/I3pD4Royo8feYN/VAZLLTjMFEWiWG7raiT0 w==; X-CSE-ConnectionGUID: vB6rxcQXR2mUYeyYueBf+w== X-CSE-MsgGUID: 6puSqxBjQTKv0hTzTVyeog== X-IronPort-AV: E=McAfee;i="6600,9927,11077"; a="34769360" X-IronPort-AV: E=Sophos;i="6.08,173,1712646000"; d="scan'208";a="34769360" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2024 07:03:49 -0700 X-CSE-ConnectionGUID: hlDNrFh6TleY1OYmN5I/ww== X-CSE-MsgGUID: ymjepgDyRPCCOahlLRk1iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,173,1712646000"; d="scan'208";a="36690457" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.125.244.72]) ([10.125.244.72]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2024 07:03:46 -0700 Message-ID: <884a4104-27c8-4604-bd80-3b8cf84fd144@linux.intel.com> Date: Sun, 19 May 2024 22:03:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, "iommu@lists.linux.dev" , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 3/9] iommu: Add attachment handle to struct iopf_group To: "Tian, Kevin" , Jason Gunthorpe , Joerg Roedel , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Nicolin Chen , "Liu, Yi L" , Jacob Pan , Joel Granados References: <20240430145710.68112-1-baolu.lu@linux.intel.com> <20240430145710.68112-4-baolu.lu@linux.intel.com> Content-Language: en-US From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/5/15 15:31, Tian, Kevin wrote: >> From: Lu Baolu >> Sent: Tuesday, April 30, 2024 10:57 PM >> >> Previously, the domain that a page fault targets is stored in an >> iopf_group, which represents a minimal set of page faults. With the >> introduction of attachment handle, replace the domain with the handle > > It's better to use 'attach handle' as the code does. Done. > >> + handle = iommu_attach_handle_get(dev->iommu_group, pasid, 0); >> + if (IS_ERR(handle)) >> + return PTR_ERR(handle); >> >> - if (!domain || !domain->iopf_handler) { >> - dev_warn_ratelimited(dev, >> - "iopf (pasid %d) without domain attached or handler >> installed\n", >> - fault->prm.pasid); >> + group->attach_handle = handle; >> + group->domain = handle->domain; > > this change also removes the warning message. Is it desired? Not desired. Perhaps we can add a message when the iopf handling is aborted. Something like below: err_abort: + dev_warn_ratelimited(dev, "iopf with pasid %d aborted\n", + fault->prm.pasid); iopf_group_response(group, IOMMU_PAGE_RESP_FAILURE); Though I am not sure which is better dev_warn() or dev_info(). Best regards, baolu