Date: Tue, 29 Jan 2019 10:08:57 -0800 (PST) From: "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net> To: John Baldwin <jhb@freebsd.org> Cc: rgrimes@freebsd.org, Enji Cooper <yaneurabeya@gmail.com>, Kyle Evans <kevans@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343543 - head/sbin/bectl/tests Message-ID: <201901291808.x0TI8vRv009504@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <33683228-91fe-5956-7fd3-ce7b8947bed0@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[ 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 <kevans@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901291808.x0TI8vRv009504>