Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp958763imm; Wed, 4 Jul 2018 08:53:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcR4PxAXMJnbwseiJtUVzISB3sU8ttXLG0iEfQTxknNB1mSsC0WbvFgSYcTbRG2tkPOHAtO X-Received: by 2002:a65:4d05:: with SMTP id i5-v6mr2407692pgt.58.1530719635040; Wed, 04 Jul 2018 08:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530719635; cv=none; d=google.com; s=arc-20160816; b=ifx1SpMrM8e9P11b5MCaROrm7bsANQt0O8hhPRJRSK3vxHJ9Q4d8TsIGZ9jqIMyf/J PsXtOrY9f8MDHkfxjQifM+Z93nRJBRiZewrH5qdics2YpWz96ivWkdbvBuXIOHsLBQ0P wmsWtwiHeuy9jsiCaH0gltJY3hoKbnR6IkfSN1QtjPB440gQuYeETnA28Gibcub/U6W+ wZTJhr1Zt4LBaW2WleEsBeerCwYf8KAFgQrljajLJAngfDFlfTRb2BhVoFORAGJ7kLku pQfRl/lDfIMaTwf1FjAvbZZy9rottjnJgCKlNIuqbtKjA0VcMKDbzKWYqQmmDH0PfZc5 XM7g== 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:arc-authentication-results; bh=b3clGdEC2w4hWPo2G0VekH67vYtYesHLkmkOm3c05kU=; b=NNy6Kna0y3Sn2I63nchJB6ki2W2rbjkKLb3ONqiPjhcukDdpdPyTDDyL5iX/sb6QUv G3LynSXpiNevh+71YonOkBSS0g2AUtN8tMqq7uBChjYVnmIg7Ry0q4Vf6tlM21dpohac epnSTK0Po1Jw6CdsrWMAVSxFinIgphN7FTJcbZoAP2A/Iq2KGyQWB+JAx26mtcTUBAjX xR6vzwTgpGMDlwOwq4mxxlzDDHXxnrwKviMBmue3pqERcfNCatqN97JdH0TnB6Q0P5b+ blJb2KPsq0QR653cN/RukKW3xn0gVNe4vyOknrl5uXT1hxB37HTUiRKFYUPi54T9V7f6 lkxQ== 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 l1-v6si3484742pgb.464.2018.07.04.08.53.40; Wed, 04 Jul 2018 08:53:55 -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 S1752960AbeGDPvx (ORCPT + 99 others); Wed, 4 Jul 2018 11:51:53 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39770 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbeGDPvw (ORCPT ); Wed, 4 Jul 2018 11:51:52 -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 3C93F7A9; Wed, 4 Jul 2018 08:51:52 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0EC293F5AD; Wed, 4 Jul 2018 08:51:52 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 083861AE189D; Wed, 4 Jul 2018 16:52:32 +0100 (BST) Date: Wed, 4 Jul 2018 16:52:31 +0100 From: Will Deacon To: Julien Grall Cc: Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, marc.zyngier@arm.com, cdall@kernel.org, eric.auger@redhat.com, catalin.marinas@arm.com, punit.agrawal@arm.com, qemu-devel@nongnu.org Subject: Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size Message-ID: <20180704155231.GP4828@arm.com> References: <1530270944-11351-1-git-send-email-suzuki.poulose@arm.com> <1530270944-11351-23-git-send-email-suzuki.poulose@arm.com> <20180704140943.GF4828@arm.com> <8c9bb3cd-f673-17f3-656f-66b7e14fc73c@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c9bb3cd-f673-17f3-656f-66b7e14fc73c@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: > On 04/07/18 15:09, Will Deacon wrote: > >On Fri, Jun 29, 2018 at 12:15:42PM +0100, Suzuki K Poulose wrote: > >>Add an option to specify the physical address size used by this > >>VM. > >> > >>Signed-off-by: Suzuki K Poulose > >>--- > >> arm/aarch64/include/kvm/kvm-config-arch.h | 5 ++++- > >> arm/include/arm-common/kvm-config-arch.h | 1 + > >> 2 files changed, 5 insertions(+), 1 deletion(-) > >> > >>diff --git a/arm/aarch64/include/kvm/kvm-config-arch.h b/arm/aarch64/include/kvm/kvm-config-arch.h > >>index 04be43d..dabd22c 100644 > >>--- a/arm/aarch64/include/kvm/kvm-config-arch.h > >>+++ b/arm/aarch64/include/kvm/kvm-config-arch.h > >>@@ -8,7 +8,10 @@ > >> "Create PMUv3 device"), \ > >> OPT_U64('\0', "kaslr-seed", &(cfg)->kaslr_seed, \ > >> "Specify random seed for Kernel Address Space " \ > >>- "Layout Randomization (KASLR)"), > >>+ "Layout Randomization (KASLR)"), \ > >>+ OPT_INTEGER('\0', "phys-shift", &(cfg)->phys_shift, \ > >>+ "Specify maximum physical address size (not " \ > >>+ "the amount of memory)"), > > > >Given that this is a shift value, I think the help message could be more > >informative. Something like: > > > > "Specify maximum number of bits in a guest physical address" > > > >I think I'd actually leave out any mention of memory, because this does > >actually have an effect on the amount of addressable memory in a way that I > >don't think we want to describe in half of a usage message line :) > Is there any particular reasons to expose this option to the user? > > I have recently sent a series to allow the user to specify the position > of the RAM [1]. With that series in mind, I think the user would not really > need to specify the maximum physical shift. Instead we could automatically > find it. Marc makes a good point that it doesn't help for MMIO regions, so I'm trying to understand whether we can do something differently there and avoid sacrificing the type parameter. Will