From owner-freebsd-emulation@freebsd.org Mon Oct 17 13:55:59 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 DFF16C14196 for ; Mon, 17 Oct 2016 13:55:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C1547B4E for ; Mon, 17 Oct 2016 13:55:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id C04B0C14195; Mon, 17 Oct 2016 13:55:59 +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 BFEA1C14194 for ; Mon, 17 Oct 2016 13:55:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E94CB43; Mon, 17 Oct 2016 13:55:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id o68so281643632qkf.3; Mon, 17 Oct 2016 06:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=HiHXMTD76sO6dgLIhDvJ5w9D+UVYaY5hXYHm+bOUxV8=; b=kcD6Sy99TVrcQW4bwM0GLEYRbo8Z6pY0EoRIIc5rdh7yq33dk8qnbEX62KxZdb7GaP OQ1VB6nnl6iGVYkJJdKSGhh+6b9/LnIgUcJdv5kxCDV4Ib9zYw1jgEe2NOkDjuljl7xQ pQ88iPtCjEuBPs+QJF3W+QhwMMFSjQIa70yy5Eul+k5Ed35fTWmhYR2CdLn8ox0h3GrU 51TjDLbxHVTG9ceK2sIFw2EoxxSlYvQ3oQAF3rGTnZDIS2Fag8KMeL+9gj6JygDbQaDc OT59jJRTTrNE9PcV6jCc0PTUMIyyTJlqp4IFHmKDJ5KBzridEsgCV5UsQQQRgx8x+das lL8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc; bh=HiHXMTD76sO6dgLIhDvJ5w9D+UVYaY5hXYHm+bOUxV8=; b=KWCYoRcDPAlMZmwakzhdVGJdLser8w/CiTEqFJT79KEEkCDu4S3x/Oo3Y1lygxrRdM h0MsJmfu73PxYicBaiXrxGIV9BfWsJVTdLK/rshWbV2TouPlNgQeu2qWO6OO8oZ/Rpyw ivRoLEhk754pXqYK6TF4bOgWBIvtbnK3i7QvwWHXOXvDI2g9i57yh9hvtEemQ+OTGq1J Gr1aQw3iXb86zh4Tzqe2eb/RGMTaaITPq5NMVj4jP4SmMgvu+HGP3zlDyx9IonFIDFlZ 43SKIlVjLrEVx94r35kp7fLomzvsl/MYY1HjIUBQG6ppBfgojmZl5N3LDPzKDLZzjGOr L3Xw== X-Gm-Message-State: AA6/9RlGubNix15iE4FZdb9/kfG+qFQMTaOJchoRdhnUwFqJcg6Fcg4XiLmHb7xi2uxbQi6qGv0KT+I0hTttmA== X-Received: by 10.194.51.37 with SMTP id h5mr11195228wjo.171.1476712558607; Mon, 17 Oct 2016 06:55:58 -0700 (PDT) MIME-Version: 1.0 Sender: rizzo.unipi@gmail.com Received: by 10.28.113.217 with HTTP; Mon, 17 Oct 2016 06:55:57 -0700 (PDT) From: Luigi Rizzo Date: Mon, 17 Oct 2016 15:55:57 +0200 X-Google-Sender-Auth: OSzS9YYtryCRzlIRBrCzqT0Q2fw Message-ID: Subject: xhyve vs bhyve diffs ? To: emulation@freebsd.org, Neel Natu , Peter Grehan , George Neville-Neil , mist64@mac.com Cc: rizzo Content-Type: text/plain; charset=UTF-8 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:56:00 -0000 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. cheers luigi -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------