Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp691403oof; Tue, 25 Sep 2018 03:25:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV61FLf0ffTsy/eIVuWhbJcoGjQ0DLdP/r6RQh0tABK/RnLuhgfLRrr6gc4uUh7SG3+zFyLJ/ X-Received: by 2002:a62:4803:: with SMTP id v3-v6mr373030pfa.89.1537871134401; Tue, 25 Sep 2018 03:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537871134; cv=none; d=google.com; s=arc-20160816; b=Hl6IojgwGl+ibXKVKPoivNLBFBYF0Jwv/uS7U2+c0DGtYwYotLBMg+QAZs1/a5Xw9n Rd5bEo3ar9kledg8NLO5RpqoUAaKE4JewVsBwYsjAit4ZRHNRFXheGQOzjjjpVdOn72w GtWB1rRckN793dZ8h6P2tonX92N9E1Zg0+u5mqh706GrSV5UjS2/OTrD5SMPq7mqaO2V WWRl0SNHwJExhCazXbLhK2olPPVkBGb1M1XqS/hUVNMCOF5cQTxRHymQyZNooQYfgY8E 8+hE+zN9PhAIoyDXHn1PC3VuK9Rg4Hvp/cAhoFN4d7pqSIZHPxCJS4ooMcG7wAYj4X5c vtpw== 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; bh=tGBQRZufry56KRCQU/sMLHTV9ICO3SyVPRX45xKP/C8=; b=WtSYbvoXMyYaRKI9FMBrmsbuMyYamBCk5lhRlmxF4PzuMwSnrkdkUvCPnBNfR8zfDA owP86tea2+AoTJ01NsKc9GtQN0wvziSJ1OZFMDrwevCgxFh3CbZYUYGJ2pRrKMloMgE8 Bdgy9ZMyZvqQkznFJxUY2/LUDMjswbTua9xbctilmvWmc1sn0pdZafcfMh/QlcFFzGiE GYNG+qRXEq5/3XXDLfVqpEByNgOrsHKAua5zjZPUHszgydbbHvSC5B8bhpuEBqjX+8bA NJ5gpQW7FGPYvMxdwRtr2jNG/WfosJgEr17PfX3bkvOtpi6aRORvwVu/rb4OwLepghx0 bS2w== 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 j65-v6si1883893pge.589.2018.09.25.03.25.18; Tue, 25 Sep 2018 03:25:34 -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 S1728559AbeIYQba (ORCPT + 99 others); Tue, 25 Sep 2018 12:31:30 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48518 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbeIYQba (ORCPT ); Tue, 25 Sep 2018 12:31:30 -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 6AE3AED1; Tue, 25 Sep 2018 03:24:38 -0700 (PDT) Received: from [192.168.0.21] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 37AE73F5B7; Tue, 25 Sep 2018 03:24:35 -0700 (PDT) Subject: Re: [PATCH v5 17/18] kvm: arm64: Limit the minimum number of page table levels To: Auger Eric , linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, marc.zyngier@arm.com, cdall@kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, will.deacon@arm.com, catalin.marinas@arm.com, james.morse@arm.com, dave.martin@arm.com, julien.grall@arm.com, linux-kernel@vger.kernel.org References: <20180917104144.19188-1-suzuki.poulose@arm.com> <20180917104144.19188-18-suzuki.poulose@arm.com> <59231541-311f-e04b-3e6b-e073a8392316@redhat.com> From: Suzuki K Poulose Message-ID: <1486a576-dc71-9b88-688f-317fb662ff69@arm.com> Date: Tue, 25 Sep 2018 11:25:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <59231541-311f-e04b-3e6b-e073a8392316@redhat.com> Content-Type: text/plain; charset=utf-8; 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 09/25/2018 11:00 AM, Auger Eric wrote: > Hi Suzuki, > > On 9/17/18 12:41 PM, Suzuki K Poulose wrote: >> Since we are about to remove the lower limit on the IPA size, >> make sure that we do not go to 1 level page table (e.g, with >> 32bit IPA on 64K host with concatenation) to avoid splitting >> the host PMD huge pages at stage2. >> >> Cc: Marc Zyngier >> Cc: Christoffer Dall >> Signed-off-by: Suzuki K Poulose >> --- >> arch/arm64/include/asm/stage2_pgtable.h | 8 +++++++- >> arch/arm64/kvm/reset.c | 12 +++++++++++- >> 2 files changed, 18 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/include/asm/stage2_pgtable.h b/arch/arm64/include/asm/stage2_pgtable.h >> index 352ec4158fdf..6a56fdff0823 100644 >> --- a/arch/arm64/include/asm/stage2_pgtable.h >> +++ b/arch/arm64/include/asm/stage2_pgtable.h >> @@ -72,8 +72,14 @@ >> /* >> * The number of PTRS across all concatenated stage2 tables given by the >> * number of bits resolved at the initial level. >> + * If we force more number of levels than necessary, we may have > more levels? >> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c >> index 76972b19bdd7..0393bb974b23 100644 >> --- a/arch/arm64/kvm/reset.c >> +++ b/arch/arm64/kvm/reset.c >> @@ -210,7 +219,8 @@ int kvm_arm_config_vm(struct kvm *kvm, unsigned long type) >> vtcr |= (kvm_get_vmid_bits() == 16) ? >> VTCR_EL2_VS_16BIT : >> VTCR_EL2_VS_8BIT; >> - vtcr |= VTCR_EL2_LVLS_TO_SL0(stage2_pgtable_levels(KVM_PHYS_SHIFT)); >> + > nit: new line not requested > Fixed all the above Suzuki