From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4B49C433DB for ; Tue, 9 Mar 2021 16:41:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B00A64FF3 for ; Tue, 9 Mar 2021 16:41:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B00A64FF3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VobNt5N/km8Hk91Kq3aCWhRRQw/pgS0m4U1Tv9NvXIs=; b=ANoQXEmuoKXDQNNYfXfyH2x0BL pcikN/sCqAbrKDWXtspyvDkVwr1alpcFr7FnkSkZMscojHhdVb+2MKRpLjE4VPZc3icE/caU7rHzQ ghD9PAhPtFtBRL8e3185cXkynFBUKHpxSMr0Ec4bSG+IFN/22mlEioU8NVUw8G8wLTz73ogHOec0H nXn6dgmNTjqd6Gl6tyhyMjBlbZ21FsAv9pue+QPQ/tBTtEFD9hn2nJbXsOLxI8FVWufpdVnfamjsb 2A7olBwFBNOktItqwNkneo5EhNF7tr1JLTokume+bOeBhlMJHSqLFIlibBBhO4K0e3P9iFxSAK1ug sVmQcRAQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJfOY-0056JZ-Ho; Tue, 09 Mar 2021 16:39:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJfOO-0056HB-4b for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 16:39:34 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B5F76651A8; Tue, 9 Mar 2021 16:39:29 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=hot-poop.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lJfOJ-000ayV-Kg; Tue, 09 Mar 2021 16:39:27 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org Cc: Andre Przywara , Will Deacon , Alexandru Elisei Subject: [PATCH 0/3] kvmtool: Limit IPA space to what is actually required Date: Tue, 9 Mar 2021 16:39:06 +0000 Message-Id: <20210309163909.822149-1-maz@kernel.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, Andre.Przywara@arm.com, will@kernel.org, alexandru.elisei@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_163932_479881_D5CB96FC X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org KVM hacking on the Apple M1 SoC has shown that kvmtool (and other VMMs) make pretty poor use of the IPA space parameter (read: do not use it and just pass 0). This results in a guest that cannot boot (thanks to a kernel bug), but in general means we don't benefit from smaller page tables at stage-2. This series does two things: - It switches kvmtool away from the default 40bit, allowing large VMs to be created (I have booted a 4TB VM) - It reduces the requested IPA space to be as small as possible It all looks really good, except that the last patch trips yet another bug in KVM so better not apply it. Yet. Marc Zyngier (3): kvmtool: Abstract KVM_VM_TYPE into a weak function kvmtool: arm64: Use the maximum supported IPA size when creating the VM kvmtool: arm64: Configure VM with the minimal required IPA space arm/aarch64/include/kvm/kvm-arch.h | 19 ++++++++++++++--- arm/aarch64/kvm.c | 33 ++++++++++++++++++++++++++++++ include/kvm/kvm.h | 1 + kvm.c | 7 ++++++- 4 files changed, 56 insertions(+), 4 deletions(-) -- 2.30.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel