From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5807531595 for ; Tue, 10 Oct 2023 22:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="CEl3o74J" Received: from [10.0.0.178] (c-76-135-56-23.hsd1.wa.comcast.net [76.135.56.23]) by linux.microsoft.com (Postfix) with ESMTPSA id 3767820B74C0; Tue, 10 Oct 2023 15:49:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3767820B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1696978189; bh=xNLCGvZHdU71qjHxRgA/1TNMVCHTexDMo8D59LMp6BY=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=CEl3o74J71QRcTdLqoPV7RImMOc17eR9UZgEQBih57CS6OUtzd9dL6Gs4mbxNvO4p UIGFgIlIptnNftQv2rfctEATzmbOcxvAV8WIaaWIZUVN/syakprhhgeazRrZAbou1J gyp8QkiN9EbrL3jsNwha+VZMO9D8arS1yiysou0c= Message-ID: <50f1721f-64fb-49ff-9740-0dac7cf832c8@linux.microsoft.com> Date: Tue, 10 Oct 2023 15:49:48 -0700 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 13/15] uapi: hyperv: Add mshv driver headers hvhdk.h, hvhdk_mini.h, hvgdk.h, hvgdk_mini.h From: Nuno Das Neves To: Greg KH , Wei Liu Cc: 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 References: <1692309711-5573-1-git-send-email-nunodasneves@linux.microsoft.com> <1692309711-5573-14-git-send-email-nunodasneves@linux.microsoft.com> <2023081923-crown-cake-79f7@gregkh> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/25/2023 11:24 AM, Nuno Das Neves wrote: > On 8/19/2023 3:26 AM, Greg KH wrote: >> >> My "strong" opinion is the one kernel development rule that we have, >> "you can not break userspace". So, if you change these >> values/structures/whatever in the future, and userspace tools break, >> that's not ok and the changes have to be reverted. >> >> If you can control both sides of the API here (with open tools that you >> can guarantee everyone will always update to), then yes, you can change >> the api in the future. >> > > This is true for us - we contribute and maintain support for this driver > in Cloud Hypervisor[1], an open source VMM. > Hi Greg, Bringing up this discussion again so we can clear up any confusion on the uapi headers in this patch set. The headers consist of the ioctls in mshv.h, and the hypervisor ABIs in the *hdk.h files. The ioctls depend on the hypervisor ABIs. We will add (to the next version), an ioctl like KVM_GET_API_VERSION [1]. This will return a version number for the ioctl interface that increments any time there is a breaking change. Userspace would be required to check this before calling any other ioctl, and it can exit gracefully if there is a mismatch. That's how KVM evolved its userspace ABI. We want to use the same approach. I also wanted to reiterate that we are the only maintainers and users of the userspace code for this driver via Cloud Hypervisor [2]. We generate rust bindings from these headers using bindgen [3]. Taking this into account, is the above a viable path for this patch set? Thanks, Nuno [1] https://docs.kernel.org/virt/kvm/api.html#kvm-get-api-version [2] https://github.com/cloud-hypervisor/cloud-hypervisor [3] https://github.com/rust-lang/rust-bindgen