Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2225898ybc; Wed, 20 Nov 2019 10:44:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwqfCkj2AJNbLVFSGczXeGyFGxhIGt9FVrHx080qsIPg2ELHfgJSBLJMbOAWrwlU5PxH91R X-Received: by 2002:a17:906:1b41:: with SMTP id p1mr7004772ejg.65.1574275487739; Wed, 20 Nov 2019 10:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574275487; cv=none; d=google.com; s=arc-20160816; b=Doa2Ej7lumyYw+dwvOV9ONzi0e54LvHQrPmmQI9/+/wNVJcvJOZMoo/pIRTq3x1bLX 1Mp1ZZicAWrS4Cj9TIYbpvFn7e9pwfQko9tF6EnIQsJOQ0dZsDvt7xM0u1NqrZqqGOUP l51T5FZelUqHGoZrAmNjHZsmHJL1av+ljU6SAjPUSMzl83BCJWlxQ/qqGJAAT2KbRWOv 2Zq++ExuLLSMlZgkna+eY6/25MdU4dzSbTyrfnXVQC7ZipddPbAwJ7yVOCvUbSjRP7MJ mYjSOkDHJeUOosbgYyX0NtAXz3titAMuN49+JEMyFm26o3gnm244knoriC6RTVJxEAXL 9jkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XqnDXUZA8hBdYLDLkExBRno0vFESq0Z5X8z79W7OB2w=; b=cHOwQfmJUKRKayU7MFV0jeu9Wxkcdf6MUn5csHevefU/tpKg3hTudPwode7yswyrt/ zkzs0WIIMyBLyHFyOovgGyw1hgFjO9SBnNpSiVe3YPEmKoigyhsY0EQWEEGR8hzqx6Ax EkkNuj6cmkX0p7hXQmN/lJnt/lFLGTz/Uvc9raEp7nJN1EzTj0E6/ocT0+E/rurMKQVs qz46o33CswYL5/vCer2t99iPG+ZxK+EkdqzKBbyinFrRJMzvabnybLhbY6yHQVU02RB/ ilIshDTIdCCuZ6a4wNJFt0GAJbu+w0BmMHdbqZdaVsA+yQOuQI6OAsBZBdfeKljdbNKj Vj8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IdN+TGHv; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o48si199199edc.151.2019.11.20.10.44.23; Wed, 20 Nov 2019 10:44:47 -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=@kernel.org header.s=default header.b=IdN+TGHv; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732139AbfKTQHS (ORCPT + 99 others); Wed, 20 Nov 2019 11:07:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:55086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729187AbfKTQHR (ORCPT ); Wed, 20 Nov 2019 11:07:17 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8019B20674; Wed, 20 Nov 2019 16:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574266037; bh=JqtM3uieK4F0AT1KOQl+ms5JG2OW35LEmqi8mfgeS28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IdN+TGHv8cjFuVQV2V+NWGv5035/01gZw8/X/NiN/YfSKsHhl/sH+J896AiOfEmRv CwcngduCPLQ7Mr5M966I+uIwfPJPOIZKoZU/BcQHt+VVUeAMLIhuwIS+0L3sjbzid+ WhOiVNmkpTRFefgOsN5CMmtmURo3D/cH/QDQXyFU= Date: Wed, 20 Nov 2019 16:07:12 +0000 From: Will Deacon To: Shameer Kolothum Cc: robin.murphy@arm.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, xuwei5@hisilicon.com, linuxarm@huawei.com Subject: Re: [PATCH] iommu/arm-smmu-v3: Populate VMID field for CMDQ_OP_TLBI_NH_VA Message-ID: <20191120160711.GA31165@willie-the-truck> References: <20191113161138.22336-1-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191113161138.22336-1-shameerali.kolothum.thodi@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 04:11:38PM +0000, 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. > > Fixes: 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TLBI_S2_IPA") > Signed-off-by: Shameer Kolothum > --- > 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(+) > > 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 arm_smmu_cmdq_ent *ent) > cmd[1] |= FIELD_PREP(CMDQ_CFGI_1_RANGE, 31); > break; > case CMDQ_OP_TLBI_NH_VA: > + cmd[0] |= FIELD_PREP(CMDQ_TLBI_0_VMID, ent->tlbi.vmid); > cmd[0] |= FIELD_PREP(CMDQ_TLBI_0_ASID, ent->tlbi.asid); > cmd[1] |= FIELD_PREP(CMDQ_TLBI_1_LEAF, ent->tlbi.leaf); > cmd[1] |= ent->tlbi.addr & CMDQ_TLBI_1_VA_MASK; Thanks. I don't think this matters with the way things currently work (we only have VMID 0 for stage-1 domains), so I'll queue it for 5.6. Will