Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2367907pxp; Mon, 21 Mar 2022 18:11:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPooAqFUxeOlY/157F4NVWWmmPp6VJmxHz90/bTOTxSGcYSQPs1SVamayIcyjdeRcQKHG7 X-Received: by 2002:a63:a51:0:b0:378:dd95:a341 with SMTP id z17-20020a630a51000000b00378dd95a341mr19656226pgk.615.1647911501934; Mon, 21 Mar 2022 18:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647911501; cv=none; d=google.com; s=arc-20160816; b=qGKMX9FQeWFMSc8bydcwFYjrEluqZV2WAHfLQq/x3QCGGorkMNKMLTKBJFGatRsn2r xZVy6W76h8orxNMn9RMj/uarqGUZNzd+EId7+yjaT6spXJE0gwAgzL7GFJv5tIxom0Oh 0p9xCQ3RoGuuN68c8GGwDk0sLA1yjXlyI4Z+XP+RVgMe9wgSp0RzymUgLJLqlXCqsiys qFyIYVxIExbfV5TajX4wGxVjvKS42K0yeSjqvh53KVKhBLHz3yDrqFoDhkROw7Td9KJX h+UU2LkReuWyt6NDOAaf9LZRuqOK4huwqiPP4ZLx4j4i2gplU+TI+Wa5seyw9rcN11Zw VnBg== 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:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=m7xkszWE+lYRkr5ly4kudviHFWzu5ojJh7eC/qhP/44=; b=tX+LXRE5jsT/+z+uLWiCJjkS61hmLd1UoukaJBb768i+tgOW6DZECS/LvC3mIHPmt/ fxmDDI5UEJcso+wN+elOA7/bMEWSuc6+Oq43uKgoNjQ251DE5Qej1dFAuChg1tWlGgq/ RMcRE2/GyZpSeRw/sKxZCTLZ+YXcdS6snJaJIR4oWDQqecDQyzeaDa3SSbmcNNHlvcF7 uQrJZj7iRAWtcPEl96DiYqw3nAduYX1yrNIymnLLgZrD8SJhhc/YW+rfqy9Zfb9WaHrx MfNa+Uy/nOoCNSJW3cuoPGhRNXD0bCCcRv2NmNlFvdPTufGZbL6YNUBJaAgypWrzVoxx f84A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XFRLL3Z2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b65-20020a633444000000b0038225ec4e50si11925117pga.553.2022.03.21.18.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 18:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XFRLL3Z2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 5B0F422295; Mon, 21 Mar 2022 17:45:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234365AbiCVAqk (ORCPT + 99 others); Mon, 21 Mar 2022 20:46:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234341AbiCVAqh (ORCPT ); Mon, 21 Mar 2022 20:46:37 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4CB6DE8 for ; Mon, 21 Mar 2022 17:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647909911; x=1679445911; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=TSpDJqCgCqJQmfCcYan0G8S5Qg4VBq1hKKqgc00HwE4=; b=XFRLL3Z2p1krXhIPAwn+UCAPUCCEo7hUjZAgQpWO9XEZFSbJe7dKo31U I+oF4Xttns5meiBVYOZvH4w+z/tqc0q0HTQMs5b9qXXPRPcR3/nOWc0rv SZXVVaiNYa35sDJIFumbSAGkL+pIQ8Fk11qeY0Y35KrY346DP3NQFbG2N tNoSvTXLnJstqWVL7CdWwRws6KWA95XRiltklCnAU+xv+MSwopxxYRfl6 45jflQHcLje4CJjtTShrc0+eMbZgaVp4P1ws86/B2TY6FcfM86wFYTZDS /N0PA1USQ5A4x1TIVHTBsDdazwo1f76bO3Pldu867cBbadCkJ+FKcwCic w==; X-IronPort-AV: E=McAfee;i="6200,9189,10293"; a="257876818" X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="257876818" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 17:45:11 -0700 X-IronPort-AV: E=Sophos;i="5.90,200,1643702400"; d="scan'208";a="560118888" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.208.85]) ([10.254.208.85]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2022 17:45:07 -0700 Message-ID: Date: Tue, 22 Mar 2022 08:45:05 +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, Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Eric Auger , Liu Yi L , Jacob jun Pan , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 01/11] iommu: Add pasid_bits field in struct dev_iommu Content-Language: en-US To: Jean-Philippe Brucker References: <20220320064030.2936936-1-baolu.lu@linux.intel.com> <20220320064030.2936936-2-baolu.lu@linux.intel.com> From: Lu Baolu In-Reply-To: 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 19:22, Jean-Philippe Brucker wrote: > Hi Baolu, > > On Sun, Mar 20, 2022 at 02:40:20PM +0800, Lu Baolu wrote: >> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> index 627a3ed5ee8f..8e262210b5ad 100644 >> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> @@ -2812,6 +2812,7 @@ static int arm_smmu_dev_enable_feature(struct device *dev, >> master->iopf_enabled = true; >> return 0; >> case IOMMU_DEV_FEAT_SVA: >> + dev->iommu->pasid_bits = master->ssid_bits; > This would be better in arm_smmu_probe_device() Sure. Best regards, baolu