From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D742BC433E0 for ; Fri, 12 Feb 2021 18:14:14 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 783F464D9F for ; Fri, 12 Feb 2021 18:14:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 783F464D9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4EFEA6F7A3 for ; Fri, 12 Feb 2021 18:14:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iMy3bpKHxzT6 for ; Fri, 12 Feb 2021 18:14:12 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 6270F6F887; Fri, 12 Feb 2021 18:14:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTP id F32746F659; Fri, 12 Feb 2021 18:14:06 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D04E0C0174; Fri, 12 Feb 2021 18:14:06 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id E7AD5C013A for ; Fri, 12 Feb 2021 18:14:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D494A87069 for ; Fri, 12 Feb 2021 18:14:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xNcCNXzwt8Nc for ; Fri, 12 Feb 2021 18:14:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C341B8705B for ; Fri, 12 Feb 2021 18:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613153642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=32Qew6ZRkFn3RJSdCrHnp0CkF1vkLaufQL3nfF97ujg=; b=LxR6DL8xGLqDqOq0Lrm0z9+jzVnLX9v8lGHo6DDf17KEVpOLBYn/r7QmhmHYMKSkHJVMGI f74SiM6q+ZosrGR5KzOwAL9ENfqMX8OXJcE3mTyntgcpvwdU6HWBts4UBsuL1xxVFepmpE 5WUjH+sgro9IfkDPwPU3pk3yrYWUWE0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-515-yMGge4DRPlaPVRnHfXJOJw-1; Fri, 12 Feb 2021 13:13:58 -0500 X-MC-Unique: yMGge4DRPlaPVRnHfXJOJw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29E18835E20; Fri, 12 Feb 2021 18:13:56 +0000 (UTC) Received: from [10.36.114.34] (ovpn-114-34.ams2.redhat.com [10.36.114.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F259E6E419; Fri, 12 Feb 2021 18:13:44 +0000 (UTC) Subject: Re: [PATCH 2/2] iommu: arm-smmu-v3: Report domain nesting info reuqired for stage1 To: Vivek Gautam , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org References: <20210212105859.8445-1-vivek.gautam@arm.com> <20210212105859.8445-3-vivek.gautam@arm.com> From: Auger Eric Message-ID: <0708b0b2-78f7-e55c-21a7-3c49eb5141df@redhat.com> Date: Fri, 12 Feb 2021 19:13:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210212105859.8445-3-vivek.gautam@arm.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Cc: jean-philippe@linaro.org, kevin.tian@intel.com, mst@redhat.com, will.deacon@arm.com, alex.williamson@redhat.com, robin.murphy@arm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: > Update nested domain information required for stage1 page table. s/reuqired/required in the commit title > > Signed-off-by: Vivek Gautam > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > 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 c11dd3940583..728018921fae 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > @@ -2555,6 +2555,7 @@ static int arm_smmu_domain_nesting_info(struct arm_smmu_domain *smmu_domain, > void *data) > { > struct iommu_nesting_info *info = (struct iommu_nesting_info *)data; > + struct arm_smmu_device *smmu = smmu_domain->smmu; > unsigned int size; > > if (!info || smmu_domain->stage != ARM_SMMU_DOMAIN_NESTED) > @@ -2571,9 +2572,20 @@ static int arm_smmu_domain_nesting_info(struct arm_smmu_domain *smmu_domain, > return 0; > } > > - /* report an empty iommu_nesting_info for now */ > - memset(info, 0x0, size); > + /* Update the nesting info as required for stage1 page tables */ > + info->addr_width = smmu->ias; > + info->format = IOMMU_PASID_FORMAT_ARM_SMMU_V3; > + info->features = IOMMU_NESTING_FEAT_BIND_PGTBL | I understood IOMMU_NESTING_FEAT_BIND_PGTBL advertises the requirement to bind tables per PASID, ie. passing iommu_gpasid_bind_data. In ARM case I guess you plan to use attach/detach_pasid_table API with iommu_pasid_table_config struct. So I understood we should add a new feature here. > + IOMMU_NESTING_FEAT_PAGE_RESP | > + IOMMU_NESTING_FEAT_CACHE_INVLD; > + info->pasid_bits = smmu->ssid_bits; > + info->vendor.smmuv3.asid_bits = smmu->asid_bits; > + info->vendor.smmuv3.pgtbl_fmt = ARM_64_LPAE_S1; > + memset(&info->padding, 0x0, 12); > + memset(&info->vendor.smmuv3.padding, 0x0, 9); > + > info->argsz = size; > + spurious new line > return 0; > } > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu