Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp13094imm; Mon, 2 Jul 2018 06:55:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7IV7OzjFko4tNymD7wOa2gj7A8jXPldWeql971EHDda2MCfmjLg2MRNGY9IvFf7Ecq6eO X-Received: by 2002:a17:902:ac1:: with SMTP id 59-v6mr25246941plp.36.1530539735249; Mon, 02 Jul 2018 06:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530539735; cv=none; d=google.com; s=arc-20160816; b=iT+cFuV/WAn/cpSAYjraUFhIJiQKOuxqAfPaRtHJF+KQeulHlRyG8MJghuXwwjBS9q gvcyIKAEyfdfxTcv72uTOM2l/9t/yms4UZylA87WVHL9y5lEu/vTQCHVzg1d/04P2yat 5mI4bV80kwG79kZMjoCEQbAAcEUWP1kA/0kfxe3QnrHzhfqo/M3of7TCpvp6Sqd0aD0X YtWTaHvKCDPS05NIFbOreE5WprKhZD2bQkLmclhcnkC7pN4EWWq1hufsfV5geV56mTdr XCMzQ/pQ/YamaiMkZM0T5ZLXndw04LClPR2X10IES7T/wupSflgSz5U0lYUfv9ebm44V v+7A== 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:arc-authentication-results; bh=1L11+QfLi4H+5lbXJxDI5YeEjzl1RVVqRfyEn23tH9E=; b=PuBJ7+29xppIJHhoaGLZMzeDLT7Rbex9fzqgNHgsU71gfWDcEdoBiH1bNZsqL5g/0p oL4/dCNO/BvUY/9sl+z+21BzQiZe1FUMwZSZmq7AnGk+Z4DIgicim6a9IJShEiItoZa/ FaolpEOU2/VRfXf7x+mKCvzYEjGwphgYzbg/Bo9lg6M75sAXNvV9QGGD6UiDpkhjnRsZ BtWqTc2nsdjEOxAz9fUESPPRjPXnK6kiuQUAjG1ErzH4qCl/O+dzzhc2w2q5D+ffo0Sn ZEBx0QPLSCTcmHsXKOCmKyo2KOKfHFfWhekrb7qPkqgNuRDBYvqln+B/P77ZoXkrdBOe 3D3g== 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 l5-v6si17571917pls.360.2018.07.02.06.55.21; Mon, 02 Jul 2018 06:55:35 -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 S1752556AbeGBNyl (ORCPT + 99 others); Mon, 2 Jul 2018 09:54:41 -0400 Received: from foss.arm.com ([217.140.101.70]:32900 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbeGBNyk (ORCPT ); Mon, 2 Jul 2018 09:54:40 -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 CB37680D; Mon, 2 Jul 2018 06:54:39 -0700 (PDT) Received: from [10.1.206.73] (en101.cambridge.arm.com [10.1.206.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B46CE3F2EA; Mon, 2 Jul 2018 06:54:37 -0700 (PDT) Subject: Re: [PATCH v3 19/20] kvm: arm64: Allow IPA size supported by the system To: Marc Zyngier , linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, cdall@kernel.org, eric.auger@redhat.com, julien.grall@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, punit.agrawal@arm.com, qemu-devel@nongnu.org References: <1530270944-11351-1-git-send-email-suzuki.poulose@arm.com> <1530270944-11351-20-git-send-email-suzuki.poulose@arm.com> <8dcb10d8-d0ff-feb9-4ca8-38d7eeb5e6ce@arm.com> From: Suzuki K Poulose Message-ID: <72472fe5-69a2-9272-c0ef-d0b981ee0446@arm.com> Date: Mon, 2 Jul 2018 14:54:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <8dcb10d8-d0ff-feb9-4ca8-38d7eeb5e6ce@arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/18 14:50, Marc Zyngier wrote: > On 29/06/18 12:15, Suzuki K Poulose wrote: >> So far we have restricted the IPA size of the VM to the default >> value (40bits). Now that we can manage the IPA size per VM and >> support dynamic stage2 page tables, allow VMs to have larger IPA. >> This is done by setting the IPA limit to the one supported by >> the hardware and kernel. This patch also moves the check for >> the default IPA size support to kvm_get_ipa_limit(). >> >> Since the stage2 page table code is dependent on the stage1 >> page table, we always ensure that : >> >> Number of Levels at Stage1 >= Number of Levels at Stage2 >> >> So we limit the IPA to make sure that the above condition >> is satisfied. This will affect the following combinations >> of VA_BITS and IPA for different page sizes. >> >> 39bit VA, 4K - IPA > 43 (Upto 48) >> 36bit VA, 16K - IPA > 40 (Upto 48) >> 42bit VA, 64K - IPA > 46 (Upto 52) > > I'm not sure I get it. Are these the IPA sizes that we forbid based on > the host VA size and page size configuration? Yes, thats right. > If so, can you rewrite > this as: > > host configuration | unsupported IPA range > 39bit VA, 4k | [44, 48] > 36bit VA, 16K | [41, 48] > 42bit VA, 64k | [47, 52] > > and say that all the other combinations are supported? Sure, that looks much better. Thanks Suzuki