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 37161E748EA for ; Sat, 30 Sep 2023 22:02:45 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w3D7qc3UdTaEEFSb0r/8LO9DZq9fHbYpueP5lFA8hm0=; b=rfTJVKZ6Rch3qI g9oNICFlM/guszQal3KgqF6vTY2QkUS/Ci3AYvV2Xgq2VlMdAOkSo/sATd+QyisHqi7/+jf6a8IdU b7Whyf4Ae24Nlux5lf1w4ByY+ZWGeGdbj8sfms33ZpkFpdvtip+pmTSHnSVLS3t59xehTm99mBuH9 bigaBIl1PbgFfTQrodEMs6v1EnWFqw+OkwOyfBROJQ5mXttCFrHrgy9xoVitwhHiBQUJyrOI3cXYc tFv/fVUBX6N9GLoGtXAqzOpuCR4T7zZfraSggcKusgEGGygQw7fBZf1BIPwuT/+R69ybBtVbTK/RJ pLVBZSaIzpYVDH8Ai9AA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qmi2N-00AASw-2C; Sat, 30 Sep 2023 22:02:11 +0000 Received: from mail-pg1-f176.google.com ([209.85.215.176]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qmi2J-00AARt-2G for linux-arm-kernel@lists.infradead.org; Sat, 30 Sep 2023 22:02:09 +0000 Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-564af0ac494so10543615a12.0 for ; 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=F8o5NrkcRvdJHkxgBK0ehdp/xzUK8k6hR9KtjyajAzpH/BPx9XEFewmEqOTy2HvU6j D8XfMPTFQZg8p2Qe6DmDEFb9d0azVhfHFiCAGlABQHURbWXobAp277DqjEgB4UvCFELS 1kFMAuJjSGJxaBHG79Q3ySzUNIYGnad/eNS7aLO1shLvZ0aNsdpqwL0pp1DVer9VvyrD +erFv1ZFIPQW3KtBsd2ydH3E1wfqJgFym+aXvGkOsyiLaEvNs8miJt92oTznA+/sfM3B pgFi2m56kUxb7qqktTLc3y++TsuTpdypuX2YsY0AlPqUur8mGIFGrTCSyAqrpAhebPtr Q0VA== X-Gm-Message-State: AOJu0YxPvJfvDjR3eyFDGZHBboiYgv+DVm47UhXoOXikcalGS+Tvf4R8 HG7nt7cJ+MWyoQitEO54NQ0= X-Google-Smtp-Source: AGHT+IGMvC2zEatQKS7y1gd4yv3/ZntbuZf7hxKHO/sCNP9K7IutMwyZgqQ2h5/QzBmBsl2VNuZdMA== 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-Disposition: inline In-Reply-To: <2023093057-eggplant-reshoot-8513@gregkh> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230930_150207_743147_9B84E41E X-CRM114-Status: GOOD ( 28.04 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel