Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3840742imm; Mon, 2 Jul 2018 06:33:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfn2vzcQ8MroHt3uvi2IQfJmQMnEdNqDHT2rqZxwq/vnAtITdGe6DM2jAQIu4Cyuhj5oioM X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr16741851plz.214.1530538395822; Mon, 02 Jul 2018 06:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530538395; cv=none; d=google.com; s=arc-20160816; b=Dd7kxCuKIm1cXc8kzSdaQ0eqhnM/TQwep74NU4yOAgcN7Uz8hGqyFTOeJqQy1dlrYr ACzHQ2u7escgp80qnVlBjf2a3fUppE5GPdqNT+h/XC+e4PysxnYOSiz04Zy/q1iJsFdF O5OpR3xWoCPqbjy4h4ZdDai+mqmMZe9FQXWiZ5YPvEPeTx0uicoD0tWcXfj61QSRIZwE u8h55BvJqDEAOBB+5l3ey4Ljyenp/fA1JXYbaX78uCvVQaQeWZ31td+Y2KP8o0XHpv3i sajL3ofMFO1gQnSpzDnju9mP7JR6ET/Ojln8TmGqeGs4PxIB2mFq8d5UYvuj5kvt63xU 3z6A== 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=l8i4/JlI7OB8km+6nyG9rHNPwZOQI3tVOSb1GBTbI2s=; b=FoC4El9BwW9M0sOSS0mykHpXfCt8kmDn5nmdSQ4yD/F85VxADhD5VJ7T4biDHDB7Hd TsF/OqAS3x+6Q3i7URlrhtdTUvw9bfw1AtKG8lH729KUCrYT9EgiZjqjti6B2u+vwncA SqSjPM0wDeC/twS7ijv5u6isSeGJIiV9idEbNmzdcJl8lwxkJwaWj5lOTbQrk23eZrBU 7KkOSI7BrDXe87gzDGwVtN8RAftktBd8GhyoFfNjB5myXEzSwJCjTG1XUjBxJJQDKl4n BgdPvn6gp85qmZuo/1m4U0mhYIctSrnZ8uqav7y+POHrOOAVF50WJ08Q2ypEGsIREVVV gu1A== 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 w27-v6si13786110pgc.232.2018.07.02.06.33.01; Mon, 02 Jul 2018 06:33:15 -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 S1752193AbeGBNbU (ORCPT + 99 others); Mon, 2 Jul 2018 09:31:20 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60482 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbeGBNbS (ORCPT ); Mon, 2 Jul 2018 09:31:18 -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 D112618A; Mon, 2 Jul 2018 06:31:17 -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 4F9553F5AD; Mon, 2 Jul 2018 06:31:15 -0700 (PDT) Subject: Re: [PATCH v3 15/20] kvm: arm/arm64: Allow tuning the physical address size for VM 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, Peter Maydel , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1530270944-11351-1-git-send-email-suzuki.poulose@arm.com> <1530270944-11351-16-git-send-email-suzuki.poulose@arm.com> From: Suzuki K Poulose Message-ID: <8392ecb1-50ce-c448-54f7-bf3021ae508b@arm.com> Date: Mon, 2 Jul 2018 14:31:13 +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: 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:13, Marc Zyngier wrote: > On 29/06/18 12:15, Suzuki K Poulose wrote: >> Allow specifying the physical address size for a new VM via >> the kvm_type argument for KVM_CREATE_VM ioctl. This allows >> us to finalise the stage2 page table format as early as possible >> and hence perform the right checks on the memory slots without >> complication. The size is encoded as Log2(PA_Size) in the bits[7:0] >> of the type field and can encode more information in the future if >> required. The IPA size is still capped at 40bits. > > Can't we relax this? There is no technical reason (AFAICS) not to allow > going down to 36bit IPA if the user has requested it. Sure, we can. > > If we run on a 36bit IPA system, the default would fail. But if the user > specified "please give me a 36bit IPA VM", we could satisfy that > requirement and allow them to run their stupidly small guest! Absolutely. I will fix this in the next version. Cheers Suzuki