From owner-freebsd-emulation@freebsd.org Mon Oct 17 13:59:42 2016 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03183C141F7 for ; Mon, 17 Oct 2016 13:59:42 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E06A6C48 for ; Mon, 17 Oct 2016 13:59:41 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id DCDA3C141F6; Mon, 17 Oct 2016 13:59:41 +0000 (UTC) Delivered-To: emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC7CEC141F5 for ; Mon, 17 Oct 2016 13:59:41 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.51.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9E46C44; Mon, 17 Oct 2016 13:59:41 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from ool-44c55a08.dyn.optonline.net ([68.197.90.8]:55622 helo=[192.168.64.1]) by vps.hungerhost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1bw8S3-0001RA-Jv; Mon, 17 Oct 2016 09:59:39 -0400 From: "George Neville-Neil" To: "Luigi Rizzo" Cc: emulation@freebsd.org, "Neel Natu" , "Peter Grehan" , mist64@mac.com Subject: Re: xhyve vs bhyve diffs ? Date: Mon, 17 Oct 2016 09:59:38 -0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.5r5263) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Authenticated-Sender: vps.hungerhost.com: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 13:59:42 -0000 On 17 Oct 2016, at 9:55, Luigi Rizzo wrote: > Hi, > I have been looking at the diffs between bhyve and xhyve and I am a > bit > puzzled on the porting approach. > > The diff (in the main code; some files are renamed) is about 7000 > lines, > but excluding context there are about 1500 deleted and 1500 added > lines > (not 1-1 replacements; there are sections of code removed from bhyve, > and some extra functions/wrappers added in xhyve). > > Of them, the vast majority of changes fits in the following > categories: > > 350 #includes, #pragma, assert and comments > 250 removal of the 'ctx' argument > 400 missing casts (the default build flags on OSX are more strict) > > The remaining set of changes is very small (probably less than 500 > true lines of code, scattered around). > > Is there any interest in reducing the diffs (I have starting doing > some > of it, but it does not make sense if there is no agreement that this > is a useful goal). > > This requires some effort on the xhyve side (some of the xhyve changes > above are completely gratuitous), but also some work on the FreeBSD > side e.g. to use more appropriate data types and/or casts. > I am only a user of xhyve but I'd definitely test and push to my own repo any changes you have. I can then popularize those and try to involve the original porter of the code. The general approach of making xhyve/bhyve closer and more similar seems like a good one to me. Having a good, BSD licensed, VM solution on FreeBSD and OS X (oh, sorry macOS whatever) seems like a fine idea. Best, George