Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2018 08:59:47 -0800
From:      Peter Grehan <grehan@freebsd.org>
To:        Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: VMX exit reason=33 and general userboot.so questions
Message-ID:  <0142d062-ca13-6917-bb06-28cac727680b@freebsd.org>
In-Reply-To: <BA57D57B-08B0-45DB-B200-C5C31994AAC7@physik.tu-berlin.de>
References:  <BA57D57B-08B0-45DB-B200-C5C31994AAC7@physik.tu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Fabian,

 >        exit_reason     33

  From the Intel SDM, vol 3B Appendix C, this error is "VM-entry failure 
due to invalid guest state".

  These errors can be difficult to debug given the large amount of guest 
state involved :(

  However, looking at the state from your dump:

 > tr desc[0]      0x0000000000000000/0x00000000/0x00000000

  I believe you will have to set this. Here's the comment and relevant 
code fragment from grub2-bhyve 
grub-core/kern/emu/bhyve_hostif.c:grub_emu_bhyve_boot32()

   /*
    * XXX TR is pointing to null selector even though we set the
    * TSS segment to be usable with a base address and limit of 0.
    * Has to be 8b or vmenter will fail
    */
   desc_access = 0x0000008b;
   assert(vm_set_desc(bhyve_ctx, 0, VM_REG_GUEST_TR, 0x1000, 0x67,
                      desc_access) == 0);

  grub2-bhyve has been able to load/boot multiboot images, so I suspect 
the register settings in grub_emu_bhyve_boot32() are a good place to 
start from.

later,

Peter.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0142d062-ca13-6917-bb06-28cac727680b>