Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp406389rwl; Fri, 4 Nov 2022 01:41:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7fSraiWZssn/gwmmH3jD+bGaSzawKZ2+SIuBK7/IyG/K/8FB5M/iMhaMV0rNharV12mLOh X-Received: by 2002:a17:907:761b:b0:7a3:86dd:d330 with SMTP id jx27-20020a170907761b00b007a386ddd330mr32839467ejc.34.1667551308743; Fri, 04 Nov 2022 01:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667551308; cv=none; d=google.com; s=arc-20160816; b=yrzVPqDZEKjHDM7cB+ftcn34uEYgS60jbXD8WJorHAGd0coGhxooqrlyFg3tLrf2tK S3Vb0cxR8W4Iqh0ycNxBCf6SgpjqYuhGwkU3UV7UXhwCCgP9GDL3kbnVEtOqNMrM+Tsd MRT7UHcjftWQ9hyCLNkwbNUjRffSOSdQvngoGPBOWZGCSRVKM0beVM6rgQhHhtBw0kjg BfiSFnu0TG/tbdRBCS2NsYPXpUl2hn0U+fevV+oMkGZVVzm6g9anG3ovI1tN2Yi9u7Up eqYDOYvXOqiwdBXbcjeIm2SVNXgt1ydSopOovt3RVISApD+Ni8Rx0onsXkbdcwPxUwiJ sS9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=4yw24n+H9sew5wjPIN5rwS9Ptmj6epn7kfJOfbtVSMk=; b=udxaY3O6ZYLZDTDAq88lHb0OWcI2mHDFgpw6zyieoNErbg5MVvVNSQczlixJcO5Drg PoGPjl2AIYOBUWFlGzZfO645Byu/Nm6w3O+R3kaclqC5QPKO/cKmTKEFJSqKtpgLNyVl gDTvr3FcsU7ae31MxY2hxkGxqRj5/PyvLfS2JPQyIzlYqojO471z6HvPiL4gOM+tb9Ai aIBbQrKs09rv8ByMt1gnKUtZyuH0t0i0PCAd/fKoRAS/edCwwtvx5DDegf/togTjM2CZ qgIyrBOhPsevUeQgEYqfumrQyAAsiUirp7hvFoxPFYzMHIjE1RqBHGPFnIFV3uuQWGXW Lcww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=Og9ijk2h; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CS7UG3tY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh14-20020a170906da8e00b0078e063fc787si1519200ejb.433.2022.11.04.01.41.24; Fri, 04 Nov 2022 01:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=Og9ijk2h; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CS7UG3tY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbiKDIKe (ORCPT + 96 others); Fri, 4 Nov 2022 04:10:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbiKDIKd (ORCPT ); Fri, 4 Nov 2022 04:10:33 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F4C21266; Fri, 4 Nov 2022 01:10:31 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E780E5C00BE; Fri, 4 Nov 2022 04:10:30 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Fri, 04 Nov 2022 04:10:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1667549430; x=1667635830; bh=4yw24n+H9s ew5wjPIN5rwS9Ptmj6epn7kfJOfbtVSMk=; b=Og9ijk2hObYCaVvY79CGJF8wxq 2lgE7uxsPAZYpI7WuRRSliXmPYja/ts8fKNpSbuarP9zeSTumYtC+NsMD/HhZzou xir+G9OdCZH8ETuQlm1LvJRBikMRh9hg7POeIvDhU1+z1GQoHjb43WdY3Qm5eTwD M4OKKBe7EBlQ89T3NfKSRkXsLGI+bUAtz4h78b5orou5p2WXTkap3rEssRQBTOtv IMfuRYBzhhN32qjJWUMsqLFkTUgdIKzcldnH1WcAcs1/7hyRYXZPY2q8VJ7LMo2F sbyq92b+2dv4V7EkbheDFCO8JXoWNG05G20KhX0VYzCm+coX5IvNUDeFX99A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1667549430; x=1667635830; bh=4yw24n+H9sew5wjPIN5rwS9Ptmj6 epn7kfJOfbtVSMk=; b=CS7UG3tY5ElDuWEDog5xPDIJyNxdYWNLQR4N3lowjwLu XMol5Ym0sE084PHNE5tp+I/QXMQlS0qxHm/5O4f8lwcFz2yW1F9OmlaxXBJw/X3D YCoQj/k9XJEJt05NfLSHL1QTue3zR3ne0O/46eP2m2uenYEHNEQZXXyE5apF67Xg Qa0J7L0Jif4wg+DADocKPA9e6jz4h0RiMGNdt8B1E7wWw+vmRgwkLqjgfW6EOVeo WmFjfLum5zoCAi4/UDO8mAIE6QBTfrVGYnHP/6haDLk13SheuG9Nk6rbubIvX685 mDflAvom14aFSse8+K48vwL9ZQE7Ih3J5tbxNze5WQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvddtgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 914A5B603ED; Fri, 4 Nov 2022 04:10:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1087-g968661d8e1-fm-20221021.001-g968661d8 Mime-Version: 1.0 Message-Id: <9dd597d9-a3f3-48f2-8416-b5b097a230d5@app.fastmail.com> In-Reply-To: <96238455-73b6-bead-0fdb-55ca68e5bf0b@quicinc.com> References: <20221026185846.3983888-1-quic_eberman@quicinc.com> <20221026185846.3983888-14-quic_eberman@quicinc.com> <722b05a1-4bf5-0837-baea-b1d0a9cc1e43@quicinc.com> <96238455-73b6-bead-0fdb-55ca68e5bf0b@quicinc.com> Date: Fri, 04 Nov 2022 09:10:12 +0100 From: "Arnd Bergmann" To: "Elliot Berman" , "Greg Kroah-Hartman" Cc: "Bjorn Andersson" , "Murali Nalajala" , "Trilok Soni" , "Srivatsa Vaddagiri" , "Carl van Schaik" , "Prakruthi Deepak Heragu" , "Andy Gross" , "Dmitry Baryshkov" , "Jassi Brar" , linux-arm-kernel@lists.infradead.org, "Mark Rutland" , "Lorenzo Pieralisi" , "Sudeep Holla" , "Marc Zyngier" , "Rob Herring" , "Krzysztof Kozlowski" , "Jonathan Corbet" , "Will Deacon" , "Catalin Marinas" , "Srinivas Kandagatla" , "Amol Maheshwari" , "Kalle Valo" , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 13/21] gunyah: vm_mgr: Introduce basic VM Manager Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 4, 2022, at 01:11, Elliot Berman wrote: > On 11/2/2022 5:24 PM, Greg Kroah-Hartman wrote: >> On Wed, Nov 02, 2022 at 11:45:12AM -0700, Elliot Berman wrote: >> >> Even if you don't support it 1:1, at least for the ones that are the >> same thing, pick the same numbers as that's a nicer thing to do, right? >> > > Does same thing == interpretation of arguments is the same? For > instance, GH_CREATE_VM and KVM_CREATE_VM interpret the arguments > differently. Same for KVM_SET_USERSPACE_MEMORY. The high level > functionality should be similar for most all hypervisors since they will > all support creating a VM and probably sharing memory with that VM. The > arguments for that will necessarily look similar, but they will probably > be subtly different because the hypervisors support different features. I think in the ideal case, you should make the arguments and the command codes the same for any command where that is possible. If you come across a command that is shared with KVM but just needs another flag, that would involve coordinating with the KVM maintainers about sharing the definition so the same flag does not get reused in an incompatible way. For commands that cannot fit into the existing definition, there should be a different command code, using your own namespace and not the 0xAE block that KVM has. It still makes sense to follow the argument structure roughly here, unless there is a technical reason for making it different. > I don't think userspace that supports both KVM and Gunyah will benefit > much from re-using the same numbers since those re-used ioctl calls > still need to sit within the context of a Gunyah VM. One immediate benefit is for tools that work on running processes, such as strace, gdb or qemu-user. If they encounter a known command, they can correctly display the arguments etc. Another benefit is for sharing portions of the VMM that live in outside processes like vhost-user based device emulation that interacts with irqfd, memfd etc. The more similar the command interface is, the easier it gets to keep these tools portable. Arnd