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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 728D5C433E0 for ; Thu, 11 Mar 2021 10:02:10 +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 E899164E55 for ; Thu, 11 Mar 2021 10:02:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E899164E55 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=rF6cawzH3eB5P6nMMZVLzWfMdNI++S0cQJwIuxJPY8o=; b=rFwMeNrOBAX/fA8wEw2/eswyld V8YaZIgWHiKhNgFeEXGuTvMt3tsQ3xJMjL308PvYuhgOL8gOF6Z7S58RM4qJ+2Fbo9Vthof/p3Gau NnDFvfWtByf8qSTYIEQCrkakDwcJkBt6CMufBAxnsxjfPgZLt2fi2Oz2PbHahhd4HNLu4J1ZPBnsA V+/A/dlHFnd6un8SCqa+8mchdgJiRXupet6OIGeV4NNW+OAtwEEpopJISoHO4T6F8Cen3IedhCx1P 1d3dCekttZ/VgbOuctD0gO2x0fdRQpC6cnjBPZDSKCpNXLUZEHuvMwOM8Krmh4fMBxefZYb6cai+y MkkINa/A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKI7O-008nis-7u; Thu, 11 Mar 2021 10:00:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKI7I-008nhv-It for linux-arm-kernel@lists.infradead.org; Thu, 11 Mar 2021 10:00:30 +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 BA0D364E55; Thu, 11 Mar 2021 10:00:26 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.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 1lKI7E-000xb0-FG; Thu, 11 Mar 2021 10:00:24 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Andrew Jones , Eric Auger , Alexandru Elisei , kernel-team@android.com Subject: [PATCH v3 0/2] KVM: arm64: Assorted IPA size fixes Date: Thu, 11 Mar 2021 10:00:14 +0000 Message-Id: <20210311100016.3830038-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org, drjones@redhat.com, eric.auger@redhat.com, alexandru.elisei@arm.com, kernel-team@android.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-20210311_100028_872672_BB31737F X-CRM114-Status: GOOD ( 17.09 ) 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 This is a rework of an initial patch posted a couple of days back[1] While working on enabling KVM on "reduced IPA size" systems, I realise we have a couple of issues, some of while do impact userspace. The first issue is that we accept the creation of a "default IPA size" VM (40 bits) even when the HW doesn't support it. Not good. The second one is that we disallow a memslot to end right where the IPA limit is. One page less and you're good, but that's not quite what it should be. I intend for both patches to be backported to -stable. Thanks, M. * From v2 [2]: - Fix silly printk blunder - Added Cc-stable and Fixes tags * From v1 [1]: - Don't try to cap the default IPA size. If userspace uses 0 with an expectation that it will get 40bits, we should abide by it and return an error immediately (noticed by Andrew) - Added a new patch to fix the exclusive nature of the IPA limit [1] https://lore.kernel.org/r/20210308174643.761100-1-maz@kernel.org [2] https://lore.kernel.org/r/20210310104208.3819061-1-maz@kernel.org Marc Zyngier (2): KVM: arm64: Reject VM creation when the default IPA size is unsupported KVM: arm64: Fix exclusive limit for IPA size Documentation/virt/kvm/api.rst | 3 +++ arch/arm64/kvm/mmu.c | 3 +-- arch/arm64/kvm/reset.c | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel