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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68920C4332F for ; Fri, 22 Apr 2022 10:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446363AbiDVKEN (ORCPT ); Fri, 22 Apr 2022 06:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1446353AbiDVKEK (ORCPT ); Fri, 22 Apr 2022 06:04:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9E353E32; Fri, 22 Apr 2022 03:01:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AF39861BCE; Fri, 22 Apr 2022 10:01:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E068C385A0; Fri, 22 Apr 2022 10:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650621677; bh=Wd+lczt9RgngB+KHzFwDqzcWWJ5RsUNianvpFDvjBR4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XURCIgmbHSzRc2sunmW23qD95gOcgPejG/ca+zhwIpRmOV+BJ3DR1b3kYWq/tc/Bc QMMFwTRfAeo3wgBdl8GE5xUVH7Pn49mbE53wJXJcwcjqpJKKjzvGungj8y6Lx6217p 83H/9vyNPwcPr/MeK8M2Mxb2Mdp5iRFoEuTUOCX2eYHwV7/Jp9aysd2mcaoyGsnJsp 5hCASXGz9VpzREL4zA3KJuiVEtgZkt3qCFDpzfHlNWyVvaotBXgcMbfuDNkVrI44/v ww4oTyAe0SgxaAZytIHUXauYVntyBhZwK8+jTK3lpu1cD8pUOm8U/tsP4LBLA52pjD DbSRvHfaeLhrQ== 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 1nhq6E-0067tx-DP; Fri, 22 Apr 2022 11:01:14 +0100 Date: Fri, 22 Apr 2022 11:01:14 +0100 Message-ID: <87a6cda13p.wl-maz@kernel.org> From: Marc Zyngier To: Paolo Bonzini Cc: Oliver Upton , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, will@kernel.org, apatel@ventanamicro.com, atishp@rivosinc.com, seanjc@google.com, pgonda@google.com Subject: Re: [PATCH 0/4] KVM: fix KVM_EXIT_SYSTEM_EVENT mess In-Reply-To: References: <20220421180443.1465634-1-pbonzini@redhat.com> 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") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, oupton@google.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, will@kernel.org, apatel@ventanamicro.com, atishp@rivosinc.com, seanjc@google.com, pgonda@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Apr 2022 10:41:34 +0100, Paolo Bonzini wrote: > > On 4/22/22 09:58, Oliver Upton wrote: > > Is there any way we could clean this up in 5.18 and leave the whole > > ndata/data pattern for 5.19? > > > > IOW, for 5.18 go back and fix the padding: > > > > struct { > > __u32 type; > > __u32 pad; > > __u64 flags; > > } system_event; > > > > Then for 5.19 circle back on the data business, except use a flag bit > > for it: > > > > struct { > > __u32 type; > > __u32 pad; > > #define KVM_SYSTEM_EVENT_NDATA_VALID (1u << 63) > > __u64 flags; > > __u64 ndata; > > __u64 data[16]; > > } system_event; > > > > Where we apply that bit to system_event::flags this time instead of > > ::type. Could also go the CAP route. > > These patches are against kvm/next, so that is already what I did. :) Can you please post a complete series? It is becoming really hard to track what you are doing. > On the other hand right now the ARM and RISC-V flags are unusable with > 32-bit userspace, so we need to fix _something_ in 5.18 as well. What 32bit userspace? arm64 doesn't have any that can interact with KVM, so I don't see anything to fix on that front. > For > your proposal, all that's missing is a 5.18 patch to add the > padding. But since the flags UAPI was completely unused before 5.18 > and there's no reason to inflict the different naming of fields to > userspace. So I think we want to apply this UAPI change in 5.18 too. As it was pointed out already, CrosVM has already started looking at the flags. The fact that it was always 0 until now doesn't make it less of a UAPI. I'd like to see a full series that implements the transition before we make a decision on this. Thanks, M. -- Without deviation from the norm, progress is not possible.