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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7017AC433F5 for ; Thu, 30 Sep 2021 07:32:37 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id E19EE61265 for ; Thu, 30 Sep 2021 07:32:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E19EE61265 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 488464B08E; Thu, 30 Sep 2021 03:32:36 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WRZYDoX8-IWe; Thu, 30 Sep 2021 03:32:35 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 31F104B0D0; Thu, 30 Sep 2021 03:32:35 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C3F934B08E for ; Thu, 30 Sep 2021 03:32:33 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OEeFkQ5sA5xh for ; Thu, 30 Sep 2021 03:32:29 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id E10284024F for ; Thu, 30 Sep 2021 03:32:28 -0400 (EDT) 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 EFAE4613A6; Thu, 30 Sep 2021 07:32:27 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mVqYL-00DtzK-V8; Thu, 30 Sep 2021 08:32:26 +0100 Date: Thu, 30 Sep 2021 08:32:25 +0100 Message-ID: <87ilyitt6e.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Subject: Re: KVM/arm64: Guest ABI changes do not appear rollback-safe In-Reply-To: References: <87mtp5q3gx.wl-maz@kernel.org> <87fsuxq049.wl-maz@kernel.org> <20210825150713.5rpwzm4grfn7akcw@gator.home> <877dg8ppnt.wl-maz@kernel.org> <20210827074011.ci2kzo4cnlp3qz7h@gator.home> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oupton@google.com, drjones@redhat.com, kvmarm@lists.cs.columbia.edu, pshier@google.com, ricarkol@google.com, rananta@google.com, reijiw@google.com, jingzhangos@google.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, Alexandru.Elisei@arm.com, suzuki.poulose@arm.com, peter.maydell@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kvm@vger.kernel.org, pshier@google.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi Oliver, On Wed, 29 Sep 2021 19:22:05 +0100, Oliver Upton wrote: > > I have some lingering thoughts on this subject since we last spoke and > wanted to discuss. > > I'm having a hard time figuring out how a VMM should handle a new > hypercall identity register introduced on a newer kernel. In order to > maintain guest ABI, the VMM would need to know about that register and > zero it when restoring an older guest. Just as it would need to be able to discover any new system register exposed by default, as it happens at all times. Which is why we have a way to discover all the registers, architected or not. > Perhaps instead we could reserve a range of firmware registers as the > 'hypercall identity' registers. Implement all of them as RAZ/WI by > default, encouraging userspace to zero these registers away for older > VMs but still allowing an old userspace to pick up new KVM features. > Doing so would align the hypercall identity registers with the feature > ID registers from the architecture. The range already exists in the form of the "coprocessor" 0x14. I don't see the need to expose it as RAZ/WI, however. If userspace doesn't know about how this pseudo-register works, it won't be able to program it anyway. I don't buy the parallel with the ID-regs either. They are RAZ/WI by default so that they don't UNDEF at runtime. The meaning of a RAZ id-register is also well defined (feature not implemented), and the CPU cannot write to them. In a way, the ID-regs *are* the enumeration mechanism. Our firmware registers don't follow the same rules. Userspace can write to them, and there is no such "not implemented" rule (case in point, PSCI). We also have a separate enumeration mechanism (GET_ONE_REG), which is (more or less) designed for userspace to find what is implemented. For these reasons, I don't immediately see the point of advertising a set of registers ahead of time, before userspace grows an understanding of what these registers mean. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm