svn commit: r343543 - head/sbin/bectl/tests

Rodney W. Grimes freebsd at pdx.rh.CN85.dnsmgr.net
Tue Jan 29 18:09:03 UTC 2019


[ 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 at 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 at freebsd.org


More information about the svn-src-head mailing list