Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp532876rdb; Sat, 30 Sep 2023 15:03:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjh/97hk0QnMaHmArVSUKuoqqrU/x/QfYhlSlnqDqohxqTdNKD9LkEiazSDnFtLeC1JLCq X-Received: by 2002:a05:6a20:12c9:b0:15d:bc0f:9b64 with SMTP id v9-20020a056a2012c900b0015dbc0f9b64mr8478133pzg.45.1696111414611; Sat, 30 Sep 2023 15:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696111414; cv=none; d=google.com; s=arc-20160816; b=Tg/jfUmar2lD2yZm7WmwkTJ5YdK5p4+Uudk6N+BKVOEs56yU1ot+mgyMxAg0kSiKUt kb7R8bzcbOj5YqsB1HrshdtZyDb73qM9YglVSEKpJS1i9HRJdfWC7Q055nENkn/uZ/M7 YPKyHx/1J38kciTo1Y8r1SkKGmF4Sqz4ck0gUhbsPtUkYCvZYMakJm+fJ+nzgECwst/n Z4x3PTm4m3pIgPorkM4xbLG6TFtJVB/jeplpkjLRf9DrOxNaUfNrNfPUM8cIihp7wlWG lLSi8h5yAvNeRkYDHVq+yVY516n6YD8yE4t9Eu5TsvOCK9zPBSAkoMnwM0wxB5tHxsyC 1Mtg== 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; bh=FeR5T76ZTZxvMCUfz5YBmfd55MUtP2rm54Tv0PEqVko=; fh=7cKcmja+wSF156/sJzgPObjvbgYVSn97YHIMiFc8P7Y=; b=IXI16LsngWbDw9HpK9TlIvKy0LPHCTUyhekz1sIsihq3y5OeOiDIzrn0osKfzp5z4R AIKhCDhs4rPG39oaLhL1wIT4yvy3hllZ1daFI2R+1V0SO4tt3oWkrLRs4DsS5hL9BYGF Wo6Ied0adt+eX5C3qA+ShYBqoHNbJpydeZcZOWO+nigY0Or1KTeaBBrqdrBxzAxGfpwN jBOYMZMsh4VpCLSatIkLIyueoB25vki7FeLk5E1ppreF5i6bnQjzs9oNxpitx8QJj+VZ S2ZZ61AR0U1yon0VdIamRrUlbhrTD7h6Hcg/rErzrZErANPHX/MJ3ATo0RA1W3G2xTCk TwOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id jh19-20020a170903329300b001bba90f8b73si22414803plb.78.2023.09.30.15.03.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 15:03:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AADDB8024187; Sat, 30 Sep 2023 15:02:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232955AbjI3WCF (ORCPT + 99 others); Sat, 30 Sep 2023 18:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbjI3WCD (ORCPT ); Sat, 30 Sep 2023 18:02:03 -0400 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AC7CA; Sat, 30 Sep 2023 15:02:01 -0700 (PDT) Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-27763c2c22eso7941726a91.3; Sat, 30 Sep 2023 15:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696111321; x=1696716121; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FeR5T76ZTZxvMCUfz5YBmfd55MUtP2rm54Tv0PEqVko=; b=jxsFaykwp58tXh7pGzOntCyv8ZjeCZ42ePDOJTifPNGztPWUvRLa/jxE0SLe2/Ou/U tSSgb7Rb2umD/7T5TPwyXdhmimqJo8ZZiH1O54ti3VQxalagXonwNQvF4yCJFMdCoXCM 3X8AUJM8xdjy8Ylwg/5K/17OznRDRggxrlJxWdxJaq06EJeXu50saexc4MsbjWNI8VDb APt0EIsrhiDjhYnoABcZlJP9x78meeZ3/VC22SXGt1QoRzUqBroYkEPQnth6vB7W2AyZ iunGl9ZGqQY1v5UYBnK7CRYU0jKGFOfSeKyVtdtVuwry2hk0Q42q1QRF5zZtX3O3AYPz DUag== X-Gm-Message-State: AOJu0Yyf3WJ5LdyjErj75ijtAdaUe9fTRYbvOp5tO6opwS6VuXYhnW3F QD9COwxoNU3UxyaTv4Lbr9Y= X-Received: by 2002:a17:90a:ea86:b0:277:1070:74a2 with SMTP id h6-20020a17090aea8600b00277107074a2mr6924409pjz.23.1696111320973; Sat, 30 Sep 2023 15:02:00 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id c3-20020a17090abf0300b0026b70d2a8a2sm3582958pjs.29.2023.09.30.15.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 15:02:00 -0700 (PDT) Date: Sat, 30 Sep 2023 22:01:58 +0000 From: Wei Liu To: Greg KH 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, wei.liu@kernel.org, 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: 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: <2023093057-eggplant-reshoot-8513@gregkh> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 30 Sep 2023 15:02:14 -0700 (PDT) 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. > > > These are unstable interfaces and as such must be compiled independently > > from published interfaces found in hyperv-tlfs.h. > > uapi files can NOT be unstable, that's the opposite of an api :( > You made a few suggestions in the past. Nuno responded here: https://lore.kernel.org/linux-hyperv/1692309711-5573-1-git-send-email-nunodasneves@linux.microsoft.com/T/#m3dd8035e381a1344acd7f570c3f5921b7415bedb > > Signed-off-by: Nuno Das Neves > > Acked-by: Wei Liu > > --- > > include/uapi/hyperv/hvgdk.h | 41 + > > include/uapi/hyperv/hvgdk_mini.h | 1076 ++++++++++++++++++++++++ > > include/uapi/hyperv/hvhdk.h | 1342 ++++++++++++++++++++++++++++++ > > include/uapi/hyperv/hvhdk_mini.h | 160 ++++ > > 4 files changed, 2619 insertions(+) > > create mode 100644 include/uapi/hyperv/hvgdk.h > > create mode 100644 include/uapi/hyperv/hvgdk_mini.h > > create mode 100644 include/uapi/hyperv/hvhdk.h > > create mode 100644 include/uapi/hyperv/hvhdk_mini.h > > > > 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. > > +/* 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? Or something else? Just by eyeballing the header files under include/uapi, there are a non-trivial number of files that use bitfields. include/uapi/linux/cdrom.h include/uapi/linux/hdreg.h include/uapi/linux/if_pppox.h include/uapi/linux/adfs_fs.h include/uapi/linux/atm.h include/uapi/linux/batadv_packet.h include/uapi/linux/bpf.h include/uapi/linux/cciss_defs.h include/uapi/linux/dccp.h include/uapi/linux/erspan.h include/uapi/linux/i2o-dev.h include/uapi/linux/icmp.h include/uapi/linux/icmpv6.h include/uapi/linux/idxd.h include/uapi/linux/if_hippi.h include/uapi/linux/igmp.h include/uapi/linux/inet_diag.h include/uapi/linux/ioam6.h include/uapi/linux/ip.h include/uapi/linux/netfilter/xt_policy.h include/uapi/linux/perf_event.h include/uapi/linux/rpl.h include/uapi/linux/tcp.h include/uapi/linux/usb/raw_gadget.h include/uapi/linux/watch_queue.h include/uapi/scsi/scsi_bsg_ufs.h include/uapi/sound/asound.h include/uapi/sound/skl-tplg-interface.h Also under arch/x86/include/uapi/asm: arch/x86/include/uapi/asm/kvm.h Can you help us understand how we can make our code work like the others listed above? There must be a way since they are all in the tree. We're happy to make adjustments. Thanks, Wei. > > thanks, > > greg k-h