Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2224414pxp; Mon, 21 Mar 2022 14:17:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoYgjIc3oF1keaOin2KW9BAvGy/E86QQ9631Iz0q+9BQwH3eZi50Zo/XHhUYTTlguzt/6T X-Received: by 2002:a05:6a00:a92:b0:4e0:57a7:2d5d with SMTP id b18-20020a056a000a9200b004e057a72d5dmr25634787pfl.81.1647897437037; Mon, 21 Mar 2022 14:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647897437; cv=none; d=google.com; s=arc-20160816; b=yNIp5q3pDdwlTbNTQi5ibRJHip4ppxdCf+lhclbRfnJQ7FQ4kXezN9v7bK73PnoaMe 8aljIgVNVprjSDuFTqA/KpOxK39AB+N75DXk88btrFrx09yvmJKn8eTScEx+k97pBLmo Dwp9ZJ9e8PaFSZdqSuPzkH3HUWnwPya0PS12V21hszeCzC6199EeNlwh1fC3xbKjZPdp CgJz7f4uQwAbi+j4mlpsRbiEeOJwfqjzDYrSHzHVbu0ySuNQS5JR+GmvUOHHLkSrPc5K lFABqXb3Z8uQMynyOYS2vf2Qo140GEcy4QtHlBcDfEgZwMXCNm+VfnJUUywJqgAVJ7zH byXw== 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=EjTFhP6pLNh8SP7hia+QSRERJDUH8MZHoqCvzO3yUHk=; b=jzpprBM7FyzE7CRs9xKUPzV84lPc/0MPGGJnLfpmDxs/4dWKfZ7Mz3124vcRGWirue 9EieUaEsIrtMBz3Jf6PXk8XsIXeuWTXwegcw0+xwv+KAX7yTqT0Rva9XQ5mAhsjMIz+B ewzAb6O+1/xudxCnxyZL744urx1kIIQ38k0dZ7j/HtC6eAeUeRW6l2/8Es2+N1Pzywcj I1WgEFTm+9NW4T44Wdnd5SgtQub+QWOeQ0kpUkId9iuaoQH6vCF8XFU5Te/6yOgK7YeS ZDHtftdx2/LdKhWgj5qI0weLp4hwDZKDDl4pOTr+fzSebUvm3BTFcrTLgCas7T+3Qwhh KiQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SiNU4Iz/"; 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=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o15-20020a656a4f000000b0038206e0017esi16248015pgu.558.2022.03.21.14.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:17:17 -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=@linaro.org header.s=google header.b="SiNU4Iz/"; 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=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C301EEA358; Mon, 21 Mar 2022 14:04:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231569AbiCULYB (ORCPT + 99 others); Mon, 21 Mar 2022 07:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244534AbiCULYA (ORCPT ); Mon, 21 Mar 2022 07:24:00 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 989008BE07 for ; Mon, 21 Mar 2022 04:22:35 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id u16so19205582wru.4 for ; Mon, 21 Mar 2022 04:22:35 -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=EjTFhP6pLNh8SP7hia+QSRERJDUH8MZHoqCvzO3yUHk=; b=SiNU4Iz/MmLcp3Eg9/x5F8VpGL82FE7rcP2CgSbbjSbZVCkNb9npsiF2VHJWukpJ00 rX9Gk4ui/c/pu5QZvgSi6a4DHQRqXMGRO0Seg4Lx7aB2q5kafVb9xYMIJXXI5TkAjcnu tWYE09gta3z5KQFnQodJorT66odExJ6+jCHTg2j2FxZxB0kL1jWZGRdb47YijoAs/5ww FY7YtXQJ+IPm1fYgCnEy78OpBcOik3zN+7I4lVo5ZPJM1hIxCShrHM+yFNcM6XXcuMG7 +SK41gum0BHXXK2FCoL/8mSBYlCz5WL+WE7sNjjqAg6Bmt2DRIsl7OrO1IcmjPGmPY8c BS/A== 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=EjTFhP6pLNh8SP7hia+QSRERJDUH8MZHoqCvzO3yUHk=; b=GXyPdf+tNp47OTzP0JdeGpzU9RMCgpkFLbmvayMTnDKY5RdkzWTNZjdn23HkeEemd5 RFB0Fr9HRu+J0Un16BIPNhn0w6nTKL089o2qEHVS/HbNKse8T1wagaB2JHve9qjR24LE flQU760wT9OGUShoylVNWeNqpF9HH50COwg8Jb1vFj96a15uJ9e0q14YZDCk2alLgCi4 SLxAWFbPZs8+5gXGqweSLbNScZPpizZ7v4QQCBgXQ/XUt94mam35Mu7POopplDoU7N1v VYcWwPPTC3rPmftS4EKmRFie45y7oYnr9rt5QCUWlZkutXSaYe3+l7MsDVHd4taL51zZ Jbrg== X-Gm-Message-State: AOAM533Ztyw85NuCX7bxifcIl2xZacloqOgE6R/RjEVE1TYL3miM4M40 rjm79RF0sqBKxMQTwx34OQpMrQ== X-Received: by 2002:a05:6000:2c8:b0:204:f83:ba35 with SMTP id o8-20020a05600002c800b002040f83ba35mr4508092wry.539.1647861754143; Mon, 21 Mar 2022 04:22:34 -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 l13-20020a05600002ad00b00203d64c5289sm14817902wry.112.2022.03.21.04.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 04:22:33 -0700 (PDT) Date: Mon, 21 Mar 2022 11:22:09 +0000 From: Jean-Philippe Brucker To: Lu Baolu Cc: 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 Message-ID: References: <20220320064030.2936936-1-baolu.lu@linux.intel.com> <20220320064030.2936936-2-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220320064030.2936936-2-baolu.lu@linux.intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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() Thanks, Jean > return arm_smmu_master_enable_sva(master); > default: > return -EINVAL;