From owner-svn-src-all@freebsd.org Tue Jan 29 18:09:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0268E14C5EC0; Tue, 29 Jan 2019 18:09:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 545D19299A; Tue, 29 Jan 2019 18:09:01 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0TI8vU4009505; Tue, 29 Jan 2019 10:08:57 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0TI8vRv009504; Tue, 29 Jan 2019 10:08:57 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901291808.x0TI8vRv009504@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343543 - head/sbin/bectl/tests In-Reply-To: <33683228-91fe-5956-7fd3-ce7b8947bed0@FreeBSD.org> To: John Baldwin Date: Tue, 29 Jan 2019 10:08:57 -0800 (PST) CC: rgrimes@freebsd.org, Enji Cooper , Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 545D19299A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2019 18:09:03 -0000 [ Charset UTF-8 unsupported, converting... ] > On 1/29/19 9:04 AM, Rodney W. Grimes wrote: > >>> On Jan 29, 2019, at 08:39, Kyle Evans wrote: > >> It?s probably and issue with timing and the bhyve implementation for amd64 vs i386, or something else. > > > > There is not a i386 mode of bhyve, ie all guests run in the same 64 bit > > virtualization and no part of the hyperviser knows if the guest is > > executing 32 bit or 64 bit code. > > While I doubt the i386 vs amd64 bits matter, it's not true that the hypervisor > doesn't know. The code to handle instruction emulation has to know since it > has to walk the page tables to map guest virtual addresses to guest > physical addresses. As a result, that part of bhyve knows about no paging > vs 32-bit paging vs PAE paging vs 64-bit paging. (Thankfully it doesn't > have to reason about real vs protected mode as we get the faulting virtual > address which is after the hardware has handled segmentation.) I forgot about that, but it is not as if there is some great difference between running i386 or amd64 code inside bhyve. Other than some very small places like the instruction emulation, they are treated the same, and most of what is going on is purely done in the hardware of the CPU with respect to i386 vs amd64. Does a drop in and out of real mode even take a VMexit? You can also run real, 32bit or 64bit code all in the same bhyve instance and bhyve, other than the emulation really cares little about what your doingm, correct? Some people get the idea that because in VirtualBox, or Vmware you specify the guest as some 32 bit flavor or some 64 bit flavor of some OS that there are mass differences. You can tell ESXi that you have a 64 bit FreeBSD guest and load the 32 bit version in there and it runs just fine. IIRC you can even tell it you have a 32 bit guest, set the nested bit in your .vmx file and go run FreeBSD 64 bit with bhyuve guests inside it. -- Rod Grimes rgrimes@freebsd.org