From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3B291945A for ; Sat, 30 Sep 2023 22:02:01 +0000 (UTC) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-278f0f565e2so5327685a91.2 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=nfAkEZN2pD2W20Ji4ig7tG2bZ8VIVBHPD72i5z878zXURTnLrjgBJpN8OWP+CEJNWh eIwnNQUhQ0Pv+xXWdQen6mJBhfBptjq2bUGqc6BBOFYShykP4nDFg1E6PQUX4SOzpsmd 2ppXDupY3zVHAJ85RpdCuaZoaBVDQOgOguRhTSEtvW5CHeIyer7opi/J8Qp7XQiRJC1h 0ENzI35NeUhzG3vjNyTyEErVON0UZA7uSPmdx9FrG70tybHUd6HhTLTAbk5YJ119UxHD /E+yU4lXa25LyLXZCNCIwTQlwxFhHyV82fdGw5gik3rRLCTjOg1od7RADaOcfRQrUthg ld9A== X-Gm-Message-State: AOJu0YwQGY/HItFMc29ALcgPB6Jm38VvSrFpmu2sV9J0Epfz+D6nILcq g7sVlOriSgPy8Nh0i5bXcks= 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> Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023093057-eggplant-reshoot-8513@gregkh> 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