freebsd-dev/sys/amd64/vmm
John Baldwin 00f3efe1bd Add support for FreeBSD/i386 guests under bhyve.
- Similar to the hack for bootinfo32.c in userboot, define
  _MACHINE_ELF_WANT_32BIT in the load_elf32 file handlers in userboot.
  This allows userboot to load 32-bit kernels and modules.
- Copy the SMAP generation code out of bootinfo64.c and into its own
  file so it can be shared with bootinfo32.c to pass an SMAP to the i386
  kernel.
- Use uint32_t instead of u_long when aligning module metadata in
  bootinfo32.c in userboot, as otherwise the metadata used 64-bit
  alignment which corrupted the layout.
- Populate the basemem and extmem members of the bootinfo struct passed
  to 32-bit kernels.
- Fix the 32-bit stack in userboot to start at the top of the stack
  instead of the bottom so that there is room to grow before the
  kernel switches to its own stack.
- Push a fake return address onto the 32-bit stack in addition to the
  arguments normally passed to exec() in the loader.  This return
  address is needed to convince recover_bootinfo() in the 32-bit
  locore code that it is being invoked from a "new" boot block.
- Add a routine to libvmmapi to setup a 32-bit flat mode register state
  including a GDT and TSS that is able to start the i386 kernel and
  update bhyveload to use it when booting an i386 kernel.
- Use the guest register state to determine the CPU's current instruction
  mode (32-bit vs 64-bit) and paging mode (flat, 32-bit, PAE, or long
  mode) in the instruction emulation code.  Update the gla2gpa() routine
  used when fetching instructions to handle flat mode, 32-bit paging, and
  PAE paging in addition to long mode paging.  Don't look for a REX
  prefix when the CPU is in 32-bit mode, and use the detected mode to
  enable the existing 32-bit mode code when decoding the mod r/m byte.

Reviewed by:	grehan, neel
MFC after:	1 month
2014-02-05 04:39:03 +00:00
..
amd Add an API to rendezvous all active vcpus in a virtual machine. The rendezvous 2014-01-14 01:55:58 +00:00
intel Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
io Support level triggered interrupts with VT-x virtual interrupt delivery. 2014-01-25 20:58:05 +00:00
vmm_dev.c Enhance the support for PCI legacy INTx interrupts and enable them in 2014-01-29 14:56:48 +00:00
vmm_host.c Corral all the host state associated with the virtual machine into its own file. 2012-10-29 01:51:24 +00:00
vmm_host.h Corral all the host state associated with the virtual machine into its own file. 2012-10-29 01:51:24 +00:00
vmm_instruction_emul.c Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
vmm_ipi.c Move <machine/apicvar.h> to <x86/apicvar.h>. 2014-01-23 20:10:22 +00:00
vmm_ipi.h Don't expose 'vmm_ipinum' as a global. 2014-01-09 03:25:54 +00:00
vmm_ktr.h Add support for level triggered interrupt pins on the vioapic. Prior to this 2013-11-27 22:18:08 +00:00
vmm_lapic.c Allow vlapic_set_intr_ready() to return a value that indicates whether or not 2014-01-07 00:38:22 +00:00
vmm_lapic.h vlapic code restructuring to make it easy to support hardware-assist for APIC 2013-12-25 06:46:31 +00:00
vmm_mem.c Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_mem.h Merge projects/bhyve_npt_pmap into head. 2013-10-05 21:22:35 +00:00
vmm_msr.c Fix x2apic support in bhyve. 2013-12-10 22:56:51 +00:00
vmm_msr.h Fix x2apic support in bhyve. 2013-12-10 22:56:51 +00:00
vmm_stat.c Handle a VM-exit due to a NMI properly by vectoring to the host's NMI handler 2014-01-22 04:03:11 +00:00
vmm_stat.h Handle a VM-exit due to a NMI properly by vectoring to the host's NMI handler 2014-01-22 04:03:11 +00:00
vmm_support.S
vmm_util.c
vmm_util.h
vmm.c Add support for FreeBSD/i386 guests under bhyve. 2014-02-05 04:39:03 +00:00
x86.c Add a new capability, VM_CAP_ENABLE_INVPCID, that can be enabled to expose 2013-10-16 18:20:27 +00:00
x86.h Allow CPUID leaf 0xD to be read as zeroes. 2013-09-06 05:16:10 +00:00