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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05512C433EF for ; Tue, 8 Feb 2022 09:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mE/vBAO5Ol01eK0q+4mDyQogVnIOh4/dlKFDItr13lM=; b=KzNaTZpA0brvgb /iSebLc3SZx8HNLtyPrse6OkQRoySwKyewB5MdZSUjs1UBYMux/Gd8rizBmSmwcVetDBlSAAYsORV g8TJY5QYK5b54yJTnaVwF0HKJa3vHTKvHgECqIdNLvXSI/se2rmvhkSlTVj3Z0Sgu/LvRenCIGV6L VPJlVgjJfkUcrCHjzIczw+q21FTdnCmd+yT+O+YFbF18KL06CRnDhHdhGGczfJScc96LOLbJ9q6sn BiB0l4ViUpjIUDDQMjnqlrpejkiEjBvxoHSp5KVsU2PsgUHFRQSMsC9g7o9sSw3UCMwsDVa/QGZz6 k4aPoVipM1u9jS0HCJlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHNFD-00DJr1-Ch; Tue, 08 Feb 2022 09:57:07 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHNFA-00DJp1-F4 for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 09:57:05 +0000 Received: by mail-lf1-x12d.google.com with SMTP id i34so32302254lfv.2 for ; Tue, 08 Feb 2022 01:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xnDB24LQeAUZkcfN3wL+FHV/aKMR05Pb76EsfKgOtQs=; b=gvGqrcbMb8DtdN8ZXcz6prSV4SyBxVL8iaSXK7eBe0hV86JPh8TEGaBs9LeBjH394n JV5aBERcpIRWYYa6clmXFDkBsubhJVVJXzuUPZt7JtaDR+AcLQ74PLG74djh/U6ThE9F jYLME7ZdZfWKpgrV+VImN+2PQV0ucGeZ80w1uSkw089d/t3KRCTq41dyBqhBLwUg08Y+ oFdo8CrrtiCXONlgKD+p0PBpktOXX9dbD5ax6mo9/6Hk50Eh3BsT6JiVSEF2I2T7Agvt DGIRHYiSRdYJMcE9MSwtJaWRukyds/9cMoCgWlB0nnL/HMht3xIjt98uC6O9o9xEKRbe 1vKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xnDB24LQeAUZkcfN3wL+FHV/aKMR05Pb76EsfKgOtQs=; b=yeftcBJUWmhT8bmhUERzoWYm0ON0HiHxO30JKVYXmuPSJq0e1TAUD2rCA8RlGgZaee WTb3/Ahld5ImaP7Ktc8HVx2MzuhswKdlfpwdFG79QDcTkdJlSNm9QGpIUmtafN3PPTaI XK5BY4/uFatuGhtaLQP6j+o/MOg7Fr03a54aHZbD2tHRK4oEUF2E/8bdVc9e/LQKAzLV VBWHWZ5S+ieqJ7r8WyYvcyOYy3QIio1COlvo2Twavr8mbYIJHWaGgOYT+k8hDr/zVz71 MiGlEQL+MY4pKKfg1xDmeZFDGiOlz9heVgedVDSwbjDwYay/lt9U/0IkWLW18EBd5byR WjHw== X-Gm-Message-State: AOAM532TA2sUtmx3CqYszhgdZbGZLN2J3z1PXPMry2aXnG0Eng67jU+u EaTRsJza35wKuAEYVPGI/XW/1YLwvXS6PuGqqlH4NA== X-Google-Smtp-Source: ABdhPJxaGa+pLWFNUpDY6o6qT/j3Mq2c5YYfreeyurnEZrGUe6/lYOJubaJ+/Um6tzeBm0PoCUWy/A+7MB2iwbKR5iU= X-Received: by 2002:a05:6512:3181:: with SMTP id i1mr2552749lfe.286.1644314218724; Tue, 08 Feb 2022 01:56:58 -0800 (PST) MIME-Version: 1.0 References: <87mtp5q3gx.wl-maz@kernel.org> <87fsuxq049.wl-maz@kernel.org> <20210825150713.5rpwzm4grfn7akcw@gator.home> <877dg8ppnt.wl-maz@kernel.org> <20210827074011.ci2kzo4cnlp3qz7h@gator.home> <87ilyitt6e.wl-maz@kernel.org> <87lf3drmvp.wl-maz@kernel.org> <875yq88app.wl-maz@kernel.org> <878ruld72v.wl-maz@kernel.org> In-Reply-To: <878ruld72v.wl-maz@kernel.org> From: Oliver Upton Date: Tue, 8 Feb 2022 01:56:47 -0800 Message-ID: Subject: Re: KVM/arm64: Guest ABI changes do not appear rollback-safe To: Marc Zyngier Cc: Raghavendra Rao Ananta , Andrew Jones , kvmarm@lists.cs.columbia.edu, pshier@google.com, ricarkol@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 , Sean Christopherson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_015704_534301_61739415 X-CRM114-Status: GOOD ( 23.00 ) 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 Hi Marc, On Tue, Feb 8, 2022 at 1:46 AM Marc Zyngier wrote: > > > KVM currently restricts the vcpu features to be unified across vcpus, > > > but that's only an implementation choice. > > > > But that implementation choice has become ABI, no? How could support > > for asymmetry be added without requiring userspace opt-in or breaking > > existing VMMs that depend on feature unification? > > Of course, you'd need some sort of advertising of this new behaviour. > > One thing I would like to add to the current state of thing is an > indication of whether the effects of a sysreg being written from > userspace are global or local to a vcpu. You'd need a new capability, > and an extra flag added to the encoding of each register. Ah. I think that is a much more reasonable fit then. VMMs unaware of this can continue to migrate new bits (albeit at the cost of potentially higher lock contention for the per-VM stuff), and those that do can reap the benefits of writing such attributes exactly once. [...] > > > A device means yet another configuration and migration API. Don't you > > > think we have enough of those? The complexity of KVM/arm64 userspace > > > API is already insane, and extremely fragile. Adding to it will be a > > > validation nightmare (it already is, and I don't see anyone actively > > > helping with it). > > > > It seems equally fragile to introduce VM-wide serialization to vCPU > > UAPI that we know is in the live migration critical path for _any_ > > VMM. Without requiring userspace changes for all the new widgets under > > discussion we're effectively forcing VMMs to do something suboptimal. > > I'm perfectly happy with suboptimal to start with, and find ways to > make it better once we have a clear path forward. I just don't want to > conflate the two. Fair. My initial concern was that it didn't seem as though there was much room for growth/improvement with the one reg UAPI, but your suggestion definitely provides a ramp out to handle VM state once per VM. Thanks for following up :) -- Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel