Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp822708rdb; Sun, 1 Oct 2023 07:04:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfBhdc4w555rgJqNotbxLlvy9tXxW2fNuqk7kxX4VU3m3wiP2gx2TqMaqyY7VELww2pYID X-Received: by 2002:a05:6a20:3942:b0:149:97e4:8ae4 with SMTP id r2-20020a056a20394200b0014997e48ae4mr15813706pzg.0.1696169098680; Sun, 01 Oct 2023 07:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696169098; cv=none; d=google.com; s=arc-20160816; b=iUHJ6SAhAUPUwUFH1AqCB2VQxWdz9o1zdzgiBQvaqaLuODYW6RillOLZU+HgaMPbPQ QI+OJuDAyPEBzD8l7kR+GMBSB7foF2pR1OHudYbzcovM+c5Eo7DXy7CyBtMB70oKvmdm PLSSh5+rlJl8kaVAf8a6vrw77+vuZTY+5mlDC/E87W/REgdlr5KhD3piTKxAdgRo78tt VL9NFV5DeONcaCT/KNa43/98ihy0rhl1OB92cZ7g4vjqDtAggfdejTjevlQDeSk2hU/+ aOPUtXP4XyYlbJpihKSqZFOGmo8WDPmo3xvqUtd0fOFb+OkLVsA3+8rqNqU9m+c89ZlQ jNzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=E65VRNkiGFZBASyk1NaaU0Zzclz9TpMwpGSTXOHFWFM=; fh=IoyuW1MdpAH/ckqYJDA59MiNzAXOSnj+fQjbVLQI568=; b=CnF76lQe4p5+xZ0xODI69uigNtJYm4GvPCmq1cCUpn/aLFLonD3X/5VOtKYdGeaanC t94aF6LMnFNhaPr23BWJQLXsDZXYT6ULAESPMhuiM0d76wLR01wickRp4+d+kN0IWP83 Fe6MfuvTT5NL+yc1RPj5lJOSRPNktrCC2lUrJ35ZuBHmX9NnTli0Tkc5e843vhjoaNQ5 pdr07YYMK9jCbxO06pnmnkMZhGPBmrrXQkkx08HquWcNklAOTIEUk5Tpkuub0jnAQ+FG LF0dpIgoSCeQQrAcDqD2l6Y+Pvc3yz24zi45D5hT2HZQo0RHb79p2xaVLctUDnziCpR7 10wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V1tJ4TJb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id cr7-20020a056a000f0700b0069353ac3d43si7559418pfb.79.2023.10.01.07.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 07:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V1tJ4TJb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 65A6C8032A3C; Sat, 30 Sep 2023 23:20:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234302AbjJAGTe (ORCPT + 99 others); Sun, 1 Oct 2023 02:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233629AbjJAGTd (ORCPT ); Sun, 1 Oct 2023 02:19:33 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04248BD; Sat, 30 Sep 2023 23:19:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1221C433C7; Sun, 1 Oct 2023 06:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696141170; bh=HCPDJuB+VMwSxIKjZO86qo5UoEDCRGeYi9qs9U712Rk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V1tJ4TJboCGp7/y9JWb9M49g9jcwUtV8cgBkmuBful5NJDpuM2utscf1o1NzLll4a Hgr9J811M/9jsP2eJoReuyfljPha7iYKEMnhZLMiVfB7O9Q3MG3DdYR6A1Ru0dod/P UGRNmRrHHacfULccI+eASPQOUtOWXFBTL6Ef259A= Date: Sun, 1 Oct 2023 08:19:27 +0200 From: Greg KH To: Wei Liu Cc: Nuno Das Neves , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, patches@lists.linux.dev, mikelley@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com, apais@linux.microsoft.com, Tianyu.Lan@microsoft.com, ssengar@linux.microsoft.com, mukeshrathor@microsoft.com, stanislav.kinsburskiy@gmail.com, jinankjain@linux.microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH v4 13/15] uapi: hyperv: Add mshv driver headers defining hypervisor ABIs Message-ID: <2023100154-ferret-rift-acef@gregkh> References: <1696010501-24584-1-git-send-email-nunodasneves@linux.microsoft.com> <1696010501-24584-14-git-send-email-nunodasneves@linux.microsoft.com> <2023093057-eggplant-reshoot-8513@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 30 Sep 2023 23:20:51 -0700 (PDT) On Sat, Sep 30, 2023 at 10:01:58PM +0000, Wei Liu wrote: > On Sat, Sep 30, 2023 at 08:09:19AM +0200, Greg KH wrote: > > On Fri, Sep 29, 2023 at 11:01:39AM -0700, Nuno Das Neves wrote: > > > These must be in uapi because they will be used in the mshv ioctl API. > > > > > > Version numbers for each file: > > > hvhdk.h 25212 > > > hvhdk_mini.h 25294 > > > hvgdk.h 25125 > > > hvgdk_mini.h 25294 > > > > what are version numbers? > > These are internal version numbers for the hypervisor headers. We keep > track of them so that we can detect if there are any breakages in the > ABI, and thus either ask them to be fixed or we come up with ways to > maintain compatibility. People outside of Microsoft don't need to worry > about this. If you don't think this information belongs in the commit > message, we can drop it. Internal numbers to a single company that have no relevance to anyone else do not belong in a changelog comment. Would you want to see this in any other kernel changelog message for any other portion of the kernel? > > > diff --git a/include/uapi/hyperv/hvgdk.h b/include/uapi/hyperv/hvgdk.h > > > new file mode 100644 > > > index 000000000000..9bcbb7d902b2 > > > --- /dev/null > > > +++ b/include/uapi/hyperv/hvgdk.h > > > @@ -0,0 +1,41 @@ > > > +/* SPDX-License-Identifier: MIT */ > > > > That's usually not a good license for a new uapi .h file, why did you > > choose this one? > > > > This is chosen so that other Microsoft developers who don't normally > work on Linux can review this code. Sorry, but that's not how kernel development is done. Please fix your internal review processes and use the correct uapi header file license. If your lawyers insist on this license, that's fine, but please have them provide a signed-off-by on the patch that adds it and have it documented why it is this license in the changelog AND in a comment in the file so we can understand what is going on with it. > > > +/* Define connection identifier type. */ > > > +union hv_connection_id { > > > + __u32 asu32; > > > + struct { > > > + __u32 id:24; > > > + __u32 reserved:8; > > > + } __packed u; > > > > bitfields will not work properly in uapi .h files, please never do that. > > Can you clarify a bit more why it wouldn't work? Endianess? Alignment? Yes to both. Did you all read the documentation for how to write a kernel api? If not, please do so. I think it mentions bitfields, but it not, it really should as of course, this will not work properly with different endian systems or many compilers. thanks, greg k-h