Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3815507imm; Mon, 1 Oct 2018 05:05:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60vEF8H72iW0Gpv8EZaEoMqwWRL5hWFGwI+9vJblhPNaAbP9Oy+tEkbC0JczeYz3jEypRR0 X-Received: by 2002:a62:6104:: with SMTP id v4-v6mr11265764pfb.122.1538395557340; Mon, 01 Oct 2018 05:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538395557; cv=none; d=google.com; s=arc-20160816; b=NP4nvMXOZYzEPlWc17O/yBz2jNfN6fFXWUsxFJXgLkZiKYrh7WJZMnAcCP+AVH41Wg 0iYExuH7xXO7TsEIdZjudp2CnT4/3BbE+h1OrFD8Zz1vFUj9nrKnTdX2O9SmTf104hoB 9zG7SNhuZnsFIZlv7sOA6Xl7R1/c9Wui1q0B3YOZdoWxar38oyhnEYyQzbA+dXD5zB8p R9WcEaMcAfMeedQTir4Yh0Ew5IRpSXhnkYJwkwzfe10ZwIEl0x7EoqN3gqsi+XIgeHCc LLlebQKVGiYr3lW83Pd7UZLUf2gmO+Vdl0unXgPVBNTpQ5IFcVjjfYTaZsaS4ULWgvn+ TH4w== 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; bh=q17iRHrTVsnP9nF6q46y2LotaH6Zzyuhqj/DL7NaHO0=; b=yb6hhHVFOcqpe9UfcAvKVQlK/VC2ppoox4bec4hxwGyd6o9ALjGxtVZ/Yt9do0w3TT 1pWtxgwnrMbOnqw6eNGAsvaZ6k17V6X9swkaOLPDSCRt9HvgjmUmLTivEmGtMpf78Dbr gkidOCeQgKN2DCXKt9WTumBHl7d2RYT2MRnIACvYAPCVn6JGy0Or5qF00aN30jG1ATAl EeDLy1W1aXkGfe/gF7+Td1jk+WwqVZXLOSoHvvdvTphOjyYUbo+uoII6wV+Da1WR7c6A 108FC4U60znDRNS1Iaoc7tH5sqOnDmMWAN0rOF52kCT6RIeX6nOLSqA+OGHlQ94w31yF ICNw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o186-v6si13036322pfo.236.2018.10.01.05.05.31; Mon, 01 Oct 2018 05:05:57 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729253AbeJASmz (ORCPT + 99 others); Mon, 1 Oct 2018 14:42:55 -0400 Received: from foss.arm.com ([217.140.101.70]:47542 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728921AbeJASmy (ORCPT ); Mon, 1 Oct 2018 14:42:54 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C87018A; Mon, 1 Oct 2018 05:05:26 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.Emea.Arm.com [10.4.12.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8BC213F5A0; Mon, 1 Oct 2018 05:05:23 -0700 (PDT) Date: Mon, 1 Oct 2018 13:05:21 +0100 From: Catalin Marinas To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, peter.maydell@linaro.org, cdall@kernel.org, kvm@vger.kernel.org, marc.zyngier@arm.com, rkrcmar@redhat.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, dave.martin@arm.com, eric.auger@redhat.com, julien.grall@arm.com, James Morse , pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v6 04/18] arm64: Add a helper for PARange to physical shift conversion Message-ID: <20181001120520.GA25071@arrakis.emea.arm.com> References: <20180926163258.20218-1-suzuki.poulose@arm.com> <20180926163258.20218-5-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180926163258.20218-5-suzuki.poulose@arm.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, Sep 26, 2018 at 05:32:40PM +0100, Suzuki K. Poulose wrote: > On arm64, ID_AA64MMFR0_EL1.PARange encodes the maximum Physical > Address range supported by the CPU. Add a helper to decode this > to actual physical shift. If we hit an unallocated value, return > the maximum range supported by the kernel. > This will be used by KVM to set the VTCR_EL2.T0SZ, as it > is about to move its place. Having this helper keeps the code > movement cleaner. > > Cc: Catalin Marinas > Cc: Marc Zyngier > Cc: James Morse > Cc: Christoffer Dall > Reviewed-by: Eric Auger > Signed-off-by: Suzuki K Poulose Acked-by: Catalin Marinas