From owner-freebsd-virtualization@FreeBSD.ORG Thu Aug 14 00:58:55 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D680C45 for ; Thu, 14 Aug 2014 00:58:55 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 00F5A27CA for ; Thu, 14 Aug 2014 00:58:54 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 8187A12630; Thu, 14 Aug 2014 10:58:52 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BXS25978 (AUTH peterg@ptree32.com.au); Thu, 14 Aug 2014 10:58:51 +1000 Message-ID: <53EC09C9.7000600@freebsd.org> Date: Wed, 13 Aug 2014 17:58:49 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Arthur Mesh Subject: Re: bhyve userboot -- lack of inb()/outb() in ficl References: <20140813191947.GO73055@juniper.net> <53EBD693.5080407@freebsd.org> <20140813233202.GT73055@juniper.net> In-Reply-To: <20140813233202.GT73055@juniper.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 00:58:55 -0000 Hi Arthur, > On Wed, Aug 13, 2014 at 02:20:19PM -0700, Peter Grehan wrote: >> It won't work for bhyveload/userboot - the VM isn't actually >> running at that point so there's nowhere for the commands to go. > > Interesting. Is it really the case that inb/outb need to go through > VM? Yes - the device emulations that process inb/outb vm-exits are in /usr/sbin/bhyve so can only be accessed by a running guest. >> Were you looking at using inb/outb for anything in particular ? > > We're reading/writing x86-specific attributes such as > nextboot,bootcause,etc to RTC memory.. Ah, I suspected as such :( A possible solution might be to fix the lack of RTC nvram save/restore in bhyve, and modify bhyveload so that there is just enough emulation of inb/outb to access the RTC nvram file. The real solution for this, hopefully not too far away, is for bhyveload to disappear and have bhyve boot directly into UEFI (with CSM BIOS emulation). In that case, the guest's boot process would be run directly. later, Peter.