From d45b7f14ae6fa78882fa9ec3be976733ca4767b4 Mon Sep 17 00:00:00 2001 From: grehan Date: Fri, 13 May 2011 04:54:01 +0000 Subject: Import of bhyve hypervisor and utilities, part 1. vmm.ko - kernel module for VT-x, VT-d and hypervisor control bhyve - user-space sequencer and i/o emulation vmmctl - dump of hypervisor register state libvmm - front-end to vmm.ko chardev interface bhyve was designed and implemented by Neel Natu. Thanks to the following folk from NetApp who helped to make this available: Joe CaraDonna Peter Snyder Jeff Heller Sandeep Mann Steve Miller Brian Pawlowski --- sys/modules/Makefile | 2 ++ sys/modules/vmm/Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 sys/modules/vmm/Makefile (limited to 'sys/modules') diff --git a/sys/modules/Makefile b/sys/modules/Makefile index e781da0..127c3e0 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -290,6 +290,7 @@ SUBDIR= ${_3dfx} \ ${_vesa} \ vge \ vkbd \ + ${_vmm} \ ${_vpo} \ vr \ vx \ @@ -557,6 +558,7 @@ _sppp= sppp _tmpfs= tmpfs _twa= twa _vesa= vesa +_vmm= vmm _x86bios= x86bios _wi= wi _wpi= wpi diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile new file mode 100644 index 0000000..67c5b0f --- /dev/null +++ b/sys/modules/vmm/Makefile @@ -0,0 +1,66 @@ +# $FreeBSD$ + +# *REQUIRES* binutils 2.20.1 for VT-x instructions +AS= /usr/local/bin/as +LD= /usr/local/bin/ld +CFLAGS+= -B /usr/local/bin + +KMOD= vmm + +SRCS= device_if.h bus_if.h pci_if.h + +CFLAGS+= -DVMM_KEEP_STATS +CFLAGS+= -DOLD_BINUTILS +CFLAGS+= -I${.CURDIR}/../../amd64/vmm +CFLAGS+= -I${.CURDIR}/../../amd64/vmm/io +CFLAGS+= -I${.CURDIR}/../../amd64/vmm/intel + +# generic vmm support +.PATH: ${.CURDIR}/../../amd64/vmm +SRCS+= vmm.c \ + vmm_dev.c \ + vmm_ipi.c \ + vmm_lapic.c \ + vmm_mem.c \ + vmm_msr.c \ + vmm_stat.c \ + vmm_util.c \ + x86.c \ + vmm_support.S + +.PATH: ${.CURDIR}/../../amd64/vmm/io +SRCS+= iommu.c \ + ppt.c \ + vdev.c \ + vlapic.c + +# intel-specific files +.PATH: ${.CURDIR}/../../amd64/vmm/intel +SRCS+= ept.c \ + vmcs.c \ + vmx_msr.c \ + vmx.c \ + vtd.c + +# amd-specific files +.PATH: ${.CURDIR}/../../amd64/vmm/amd +SRCS+= amdv.c + +OBJS= vmx_support.o + +CLEANFILES= vmx_assym.s vmx_genassym.o + +vmx_assym.s: vmx_genassym.o +.if exists(@) +vmx_assym.s: @/kern/genassym.sh +.endif + sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET} + +vmx_support.o: vmx_support.S vmx_assym.s + ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ + ${.IMPSRC} -o ${.TARGET} + +vmx_genassym.o: vmx_genassym.c @ machine + ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + +.include -- cgit v1.1