From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757848AbcLURu7 (ORCPT ); Wed, 21 Dec 2016 12:50:59 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34161 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508AbcLURu5 (ORCPT ); Wed, 21 Dec 2016 12:50:57 -0500 Date: Wed, 21 Dec 2016 09:50:49 -0800 From: Stephen Hemminger To: Christoph Hellwig Cc: Paolo Bonzini , Roman Kagan , Radim =?UTF-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Vitaly Kuznetsov , kvm@vger.kernel.org, "Denis V . Lunev" , Haiyang Zhang , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , devel@linuxdriverproject.org, Thomas Gleixner Subject: Re: [PATCH 12/15] hyperv: move VMBus connection ids to uapi Message-ID: <20161221095049.6fdc3145@xeon-e3> In-Reply-To: <20161221154348.GA31401@infradead.org> References: <20161220155602.6298-1-rkagan@virtuozzo.com> <20161220155602.6298-13-rkagan@virtuozzo.com> <20161220092543.6183bffd@xeon-e3> <20161221062939.GB15917@rkaganb.sw.ru> <20161221121858.GA17429@infradead.org> <20161221125920.GG15917@rkaganb.sw.ru> <20161221142654.GB8594@infradead.org> <20161221154348.GA31401@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Dec 2016 07:43:48 -0800 Christoph Hellwig wrote: > On Wed, Dec 21, 2016 at 04:39:18PM +0100, Paolo Bonzini wrote: > > That said, there are precedents in using UAPI this way for PV > > interfaces. See for example include/uapi/linux/virtio*.h and > > arch/x86/include/uapi/asm/kvm_para.h. > > We have all kinds of historical examples, but most of them turned > into a major pain sooner or later - my favourite example are the > SCSI protocol headers. > > Protocols needs to stay compatible on the (virtual) wire, but not > on the language level. Locking us into the strict UABI policies > for them just make someone life horrible further down the road. If the the protocols come from external sources (like the current NDIS definitions), then it is not a big deal. There is some overlap already where NDIS is used multiple places and there are multiple header files with same definition. That could be fixed. The bigger problem is that some of the API's between guest and host could be implemented multiple ways and don't want userspace ABI files constraining how something like atomic bit operation for wakeup is done. The other problem with the hyperv headers is they were initially done with only the Linux driver usage in mind. This made perfect sense at the time, the problem is that they mix internal state with protocol definitions. Lastly, there is licensing issues on headers. It would be good to have any userspace ABI headers licensed with a more liberal license so that BSD and DPDK drivers could use them directly. Right now each one reinvents. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 12/15] hyperv: move VMBus connection ids to uapi Date: Wed, 21 Dec 2016 09:50:49 -0800 Message-ID: <20161221095049.6fdc3145@xeon-e3> References: <20161220155602.6298-1-rkagan@virtuozzo.com> <20161220155602.6298-13-rkagan@virtuozzo.com> <20161220092543.6183bffd@xeon-e3> <20161221062939.GB15917@rkaganb.sw.ru> <20161221121858.GA17429@infradead.org> <20161221125920.GG15917@rkaganb.sw.ru> <20161221142654.GB8594@infradead.org> <20161221154348.GA31401@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "H. Peter Anvin" , kvm@vger.kernel.org, Radim =?UTF-8?B?S3LEjW3DocWZ?= , Haiyang Zhang , x86@kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, Ingo Molnar , Roman Kagan , "Denis V . Lunev" , Paolo Bonzini , Thomas Gleixner To: Christoph Hellwig Return-path: In-Reply-To: <20161221154348.GA31401@infradead.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: kvm.vger.kernel.org On Wed, 21 Dec 2016 07:43:48 -0800 Christoph Hellwig wrote: > On Wed, Dec 21, 2016 at 04:39:18PM +0100, Paolo Bonzini wrote: > > That said, there are precedents in using UAPI this way for PV > > interfaces. See for example include/uapi/linux/virtio*.h and > > arch/x86/include/uapi/asm/kvm_para.h. > > We have all kinds of historical examples, but most of them turned > into a major pain sooner or later - my favourite example are the > SCSI protocol headers. > > Protocols needs to stay compatible on the (virtual) wire, but not > on the language level. Locking us into the strict UABI policies > for them just make someone life horrible further down the road. If the the protocols come from external sources (like the current NDIS definitions), then it is not a big deal. There is some overlap already where NDIS is used multiple places and there are multiple header files with same definition. That could be fixed. The bigger problem is that some of the API's between guest and host could be implemented multiple ways and don't want userspace ABI files constraining how something like atomic bit operation for wakeup is done. The other problem with the hyperv headers is they were initially done with only the Linux driver usage in mind. This made perfect sense at the time, the problem is that they mix internal state with protocol definitions. Lastly, there is licensing issues on headers. It would be good to have any userspace ABI headers licensed with a more liberal license so that BSD and DPDK drivers could use them directly. Right now each one reinvents.