Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2240972ybc; Wed, 13 Nov 2019 11:10:10 -0800 (PST) X-Google-Smtp-Source: APXvYqybsNOjz8n9uk9aNQ1D/BHYovssBmVyIsEcr+Ro5rzlqG0hJ/MvRfBFzXCY8+GMS1GhQHkh X-Received: by 2002:a05:6402:611:: with SMTP id n17mr5387760edv.143.1573672210065; Wed, 13 Nov 2019 11:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573672210; cv=none; d=google.com; s=arc-20160816; b=wnfeRoVlSzgTzGjL+n+tCJctn4eDnwEJmqv+oTCMgj/Ff9989WpoxDmD2N4SH/TwdH WTLVne1fJ2kSyNIQUsPi7SLGcuqBGNDHmnyBhjd9epGbAVvjDdzhMXMBO0PvoKR9uBsq T6sOY1KtpaiSW6jYWWpkxDi9Wuf3Sjgr6l01hTzKt7OlS/fnPMeaVf7tl0QtnaGZqC9b 8Of5hLyZq3YJIcXlydNsTxJeCKHt5rYZig8SfDyFPrY5DICjpBcu+P4A8Mf1pCabinJ6 RR8NRnBgKD3Eivr11O+t4E6twrUhKz35WwVACYsQ4AQ8dt+wyBLvwqJwKEpZEp9NMsQi pRag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=4jSlvNFHg6IbUCrmqPiwkPs953WRyG/IfAUfAH0jbow=; b=fLDJoVKJnb9bAMZYvuh3gOqShodaqDhwqfIezEX8B1pdwDF7bQCscdNH/z7Qw3e3Y1 psjACy7wPIWq9ZhWTzSOajvo/y6nhZIysy/nVEEmRexTk+4JZb3J+qBe77A+aK3GCOoT ZqqRP3zeH/UlXvesVMBbOBFjnI4zfN4R+uoSeLekJNfixxyN65Yvcr2WTFMptfyhBjZo J8WcOyLdHXTt281SiSMdJ+6aT8RJLjlkp6sCCA00QApMhUCsVjSorGyoIGzOo0nsjn+I RG2h1UQkl74ZZhFWPvu89PxV7rZlUftZYwsJJLqazC2x/wD+RGAgsKEiosVFqqltoE+W 6pMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JDQTQlro; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si2249813eda.258.2019.11.13.11.09.45; Wed, 13 Nov 2019 11:10:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JDQTQlro; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfKMRNY (ORCPT + 99 others); Wed, 13 Nov 2019 12:13:24 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43260 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726098AbfKMRNY (ORCPT ); Wed, 13 Nov 2019 12:13:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573665203; 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=4jSlvNFHg6IbUCrmqPiwkPs953WRyG/IfAUfAH0jbow=; b=JDQTQlrocu8CMmBkF8NIe3akmkLsI6ANMXgi9QlBslRzIhlnrPbbvdEu5KZg2gFFW1Pp75 NWDibwmfrPDxPWCys1K+kOPdsDBzsEQT9MdH0cjXqJ9Tfqaj/UK39pOp6+c+1b4alvN/O/ NImZgDf+a8H29W4HHELwy9XMEdRGmaU= 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-256-Rhzwd5RWMB2ogwfEoeuiIw-1; Wed, 13 Nov 2019 12:13:20 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5130117125C; Wed, 13 Nov 2019 17:13:18 +0000 (UTC) Received: from [10.36.116.54] (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1FDE5F761; Wed, 13 Nov 2019 17:13:15 +0000 (UTC) Subject: Re: [PATCH] iommu/arm-smmu-v3: Populate VMID field for CMDQ_OP_TLBI_NH_VA To: Shameer Kolothum , will@kernel.org, robin.murphy@arm.com Cc: linuxarm@huawei.com, xuwei5@hisilicon.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org References: <20191113161138.22336-1-shameerali.kolothum.thodi@huawei.com> From: Auger Eric Message-ID: <5bf7d4e1-5231-3ee5-b239-d05523c96e5e@redhat.com> Date: Wed, 13 Nov 2019 18:13:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20191113161138.22336-1-shameerali.kolothum.thodi@huawei.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: Rhzwd5RWMB2ogwfEoeuiIw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shameer, On 11/13/19 5:11 PM, Shameer Kolothum wrote: > CMDQ_OP_TLBI_NH_VA requires VMID and this was missing since > commit 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask > for CMD_TLBI_S2_IPA"). Add it back. >=20 > Fixes: 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TL= BI_S2_IPA") > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Thanks! Eric > --- > This came to light while verifying the "SMMUv3 Nested Stage Setup" > series by Eric. Please find the discusiion here, > https://lore.kernel.org/patchwork/cover/1099617/ > --- > drivers/iommu/arm-smmu-v3.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c > index 8da93e730d6f..9b5274346df0 100644 > --- a/drivers/iommu/arm-smmu-v3.c > +++ b/drivers/iommu/arm-smmu-v3.c > @@ -856,6 +856,7 @@ static int arm_smmu_cmdq_build_cmd(u64 *cmd, struct a= rm_smmu_cmdq_ent *ent) > =09=09cmd[1] |=3D FIELD_PREP(CMDQ_CFGI_1_RANGE, 31); > =09=09break; > =09case CMDQ_OP_TLBI_NH_VA: > +=09=09cmd[0] |=3D FIELD_PREP(CMDQ_TLBI_0_VMID, ent->tlbi.vmid); > =09=09cmd[0] |=3D FIELD_PREP(CMDQ_TLBI_0_ASID, ent->tlbi.asid); > =09=09cmd[1] |=3D FIELD_PREP(CMDQ_TLBI_1_LEAF, ent->tlbi.leaf); > =09=09cmd[1] |=3D ent->tlbi.addr & CMDQ_TLBI_1_VA_MASK; >=20