Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4654736imm; Mon, 17 Sep 2018 18:56:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ1YADBU7qBZOfXIsW8/BhNcbxKztS5S2Q0d1tn+eenkKRh8QWF63p1IYX0mMnKz9Xay61W X-Received: by 2002:a17:902:82c5:: with SMTP id u5-v6mr27009642plz.83.1537235766929; Mon, 17 Sep 2018 18:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537235766; cv=none; d=google.com; s=arc-20160816; b=DRZOZFNzUgU8MMHj4wjoKnnqwgzELvU19aTijE5d4KNFMozU/Mu0qifrrToSot2qYo pbsZ/KwIxD+uinNUV746E76r+S8dyW+k9K2TQyUpiLnaulEbRfoXNBjLF+KKs/0G0K52 y5zTolWWEFWXcc2JoZS1eW6fkpMHoQNRcjQRFWLXHUCQoZFesHDj963dPzdlEQh6P7Am yP9nsBX9bO+ZiOXgAbTdRJW6B4pj0KOKNip2H26I8lj4HAJY2m/E22Tle6W/ORejQKzj CVujjDQEuT/G7+WXf1uA2lkV4YDclUJzP7fSvWwSP/guq5Ywx7vQfdGK3EJi2i0FM8zh tuIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=PDgkR5lgd0P1pd/DomTxnOnMi2SGfT6/lbvhCFAe+vI=; b=psK8oOYO0QYc2iI3oVL3TSPtjjoj2BpLLv7jLfyhhzd1xwNuumtxPSBb9uf6d8WOU6 rbnpNzUQdXz0JlfyFTjj7Wy2W7SSoHnQYFKdMgxrAc3WDmYgBzzAdlqHNmkB26TKaMTV E7aWFLBeH8cOnmIvQiEvDaCGMiJlQI1GqQJPgY3pAg5Uz6qDBswUW3uaXiYs6huu9nWX 4bPSocSs73GdfPwrrLT8GB7EqUmm340DHa+K5LAZpF0ibPyyOCiWvR87cwPkbX5Ag9d5 tnh/KHs00YeeO1hc/V9r29EzntveqWmJQIG6fCVMkEtIXZF5fx6aokaHFl5vegdKzLC9 7mVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GbF/XWK9"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si16663692plz.492.2018.09.17.18.55.51; Mon, 17 Sep 2018 18:56:06 -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; dkim=pass header.i=@linaro.org header.s=google header.b="GbF/XWK9"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727559AbeIRHZe (ORCPT + 99 others); Tue, 18 Sep 2018 03:25:34 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:35398 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbeIRHZd (ORCPT ); Tue, 18 Sep 2018 03:25:33 -0400 Received: by mail-ot1-f65.google.com with SMTP id j9-v6so353280otl.2 for ; Mon, 17 Sep 2018 18:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PDgkR5lgd0P1pd/DomTxnOnMi2SGfT6/lbvhCFAe+vI=; b=GbF/XWK98rQR0rts1vC6J63ppDi1yYUReCvTsZOg/T1tF1mtEAo+miK94aRmsKVwkU VzbaAJnuz9Q/2PK26z4b/H+3TRP1qiKNwERSrz0YHtp7KGNMbGFgGNoV938yWM+Vm3ST 1/+APD+f2uxoilCFflpn7aVG3k4i04JaGW9Ao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PDgkR5lgd0P1pd/DomTxnOnMi2SGfT6/lbvhCFAe+vI=; b=Mg1mQl5iOe6UiOvx1VoriLwl8OHiIOFPlisGfuEqbSC2Qt4bkB/471shI7pBNbMJ2d MJcB8e0E34HCYWKn6Pql12y2zS45I8qFSrS8tHYuy//nvyvKHgxCJA29cTQJpY8+ft65 fj1sbZoJb0veYje8F+z4m225SgauaUbxnwBbCpCDxQCVZRanM8DbngvHhd/ZNhmgnS+4 lXr5Q+Odtr4k02inbiFGugKPte0z0fFKUN7dHCsjBmasLzs+6T7i7MYLOQzY82QTNpdU nEeUgdgWNJ9LoeSLWmfLp9wD8g2J7ISK3Tigqz38d/D33xn3B2yjfdY9BeCNA/C3+5r+ fH5g== X-Gm-Message-State: APzg51AfOwuforEAoGXn2ktVp+a3j8RKu0zEHU82C6gD3w2hzdKZvIDV JD5kzaoSiJ17EEWsLcqwU9O8SKuJ65lkbAXtFehDAQ== X-Received: by 2002:a9d:7395:: with SMTP id j21-v6mr14982917otk.203.1537235725791; Mon, 17 Sep 2018 18:55:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:20e3:0:0:0:0:0 with HTTP; Mon, 17 Sep 2018 18:55:05 -0700 (PDT) In-Reply-To: <20180917104144.19188-19-suzuki.poulose@arm.com> References: <20180917104144.19188-1-suzuki.poulose@arm.com> <20180917104144.19188-19-suzuki.poulose@arm.com> From: Peter Maydell Date: Tue, 18 Sep 2018 02:55:05 +0100 Message-ID: Subject: Re: [PATCH v5 18/18] kvm: arm64: Allow tuning the physical address size for VM To: Suzuki K Poulose Cc: arm-mail-list , kvmarm@lists.cs.columbia.edu, kvm-devel , Marc Zyngier , Christoffer Dall , Eric Auger , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Will Deacon , Catalin Marinas , James Morse , Dave P Martin , julien.grall@arm.com, lkml - Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17 September 2018 at 11:41, Suzuki K Poulose wrote: > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -122,6 +122,14 @@ the default trap & emulate implementation (which changes the virtual > memory layout to fit in user mode), check KVM_CAP_MIPS_VZ and use the > flag KVM_VM_MIPS_VZ. > > +To configure the physical address space size for a VM (IPA size) on arm64, > +check KVM_CAP_ARM_VM_PHYS_SHIFT (which returns the maximum limit for the > +IPA shift) and use KVM_VM_TYPE_ARM_PHYS_SHIFT(PHYS_SHIFT). Bits[7-0] of the > +machine type has been reserved for specifying the PHYS_SHIFT. > +The supported range is [32...IPA_LIMIT], where IPA_LIMIT could be > +identified by checking KVM_CAP_ARM_VM_PHYS_SHIFT. For backward compatibility > +a value of 0 selects 40bits. > + Given this as the API documentation, I don't think I could figure out what I as a userspace user of it need to do without looking at the kernel code. Could I ask you to expand it so that it is a bit less terse and a bit more detailed? (For instance, what is a PHYS_SHIFT and why do I have to specify it rather than just telling the kernel I want a 48 bit guest address space?) thanks -- PMM