2011-05-13 04:54:01 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
KMOD= vmm
|
|
|
|
|
2013-08-21 08:01:52 +00:00
|
|
|
SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h
|
2014-10-20 02:57:30 +00:00
|
|
|
SRCS+= vmx_assym.h svm_assym.h
|
2014-10-27 18:37:11 +00:00
|
|
|
DPSRCS= vmx_genassym.c svm_genassym.c
|
2011-05-13 04:54:01 +00:00
|
|
|
|
2011-05-14 20:35:01 +00:00
|
|
|
CFLAGS+= -DVMM_KEEP_STATS -DSMP
|
2013-08-21 08:01:52 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/io
|
2011-05-13 04:54:01 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/intel
|
2013-08-23 00:37:26 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/amd
|
2011-05-13 04:54:01 +00:00
|
|
|
|
|
|
|
# generic vmm support
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm
|
|
|
|
SRCS+= vmm.c \
|
|
|
|
vmm_dev.c \
|
2012-10-29 01:51:24 +00:00
|
|
|
vmm_host.c \
|
2012-09-25 22:31:35 +00:00
|
|
|
vmm_instruction_emul.c \
|
2014-03-11 16:56:00 +00:00
|
|
|
vmm_ioport.c \
|
2011-05-13 04:54:01 +00:00
|
|
|
vmm_ipi.c \
|
|
|
|
vmm_lapic.c \
|
|
|
|
vmm_mem.c \
|
|
|
|
vmm_stat.c \
|
|
|
|
vmm_util.c \
|
|
|
|
x86.c \
|
|
|
|
vmm_support.S
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/io
|
|
|
|
SRCS+= iommu.c \
|
|
|
|
ppt.c \
|
2014-03-11 16:56:00 +00:00
|
|
|
vatpic.c \
|
2014-03-25 19:20:34 +00:00
|
|
|
vatpit.c \
|
2013-11-25 19:04:51 +00:00
|
|
|
vhpet.c \
|
2013-11-12 22:51:03 +00:00
|
|
|
vioapic.c \
|
2014-10-26 04:44:28 +00:00
|
|
|
vlapic.c \
|
|
|
|
vpmtmr.c
|
2011-05-13 04:54:01 +00:00
|
|
|
|
|
|
|
# intel-specific files
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/intel
|
|
|
|
SRCS+= ept.c \
|
|
|
|
vmcs.c \
|
|
|
|
vmx_msr.c \
|
2014-10-17 13:20:49 +00:00
|
|
|
vmx_support.S \
|
2011-05-13 04:54:01 +00:00
|
|
|
vmx.c \
|
|
|
|
vtd.c
|
|
|
|
|
|
|
|
# amd-specific files
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/amd
|
2013-08-23 00:37:26 +00:00
|
|
|
SRCS+= vmcb.c \
|
|
|
|
svm.c \
|
2014-10-20 02:57:30 +00:00
|
|
|
svm_support.S \
|
2013-08-23 00:37:26 +00:00
|
|
|
npt.c \
|
2014-09-20 21:46:31 +00:00
|
|
|
amdv.c \
|
|
|
|
svm_msr.c
|
2014-10-27 18:37:11 +00:00
|
|
|
|
2014-10-20 02:57:30 +00:00
|
|
|
CLEANFILES= vmx_assym.h vmx_genassym.o svm_assym.h svm_genassym.o
|
2011-05-13 04:54:01 +00:00
|
|
|
|
2014-10-17 13:20:49 +00:00
|
|
|
vmx_assym.h: vmx_genassym.o
|
2011-05-13 04:54:01 +00:00
|
|
|
.if exists(@)
|
2014-10-17 13:20:49 +00:00
|
|
|
vmx_assym.h: @/kern/genassym.sh
|
2011-05-13 04:54:01 +00:00
|
|
|
.endif
|
|
|
|
sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET}
|
|
|
|
|
2014-10-20 02:57:30 +00:00
|
|
|
svm_assym.h: svm_genassym.o
|
2013-08-23 00:37:26 +00:00
|
|
|
.if exists(@)
|
2014-10-20 02:57:30 +00:00
|
|
|
svm_assym.h: @/kern/genassym.sh
|
2013-08-23 00:37:26 +00:00
|
|
|
.endif
|
|
|
|
sh @/kern/genassym.sh svm_genassym.o > ${.TARGET}
|
|
|
|
|
2014-10-17 13:20:49 +00:00
|
|
|
vmx_support.o:
|
2011-05-13 04:54:01 +00:00
|
|
|
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
|
|
|
|
${.IMPSRC} -o ${.TARGET}
|
|
|
|
|
2014-10-20 02:57:30 +00:00
|
|
|
svm_support.o:
|
2013-08-23 00:37:26 +00:00
|
|
|
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
|
|
|
|
${.IMPSRC} -o ${.TARGET}
|
|
|
|
|
2014-10-17 13:20:49 +00:00
|
|
|
vmx_genassym.o:
|
2011-05-13 04:54:01 +00:00
|
|
|
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
|
|
|
|
|
2014-10-20 02:57:30 +00:00
|
|
|
svm_genassym.o:
|
2013-08-23 00:37:26 +00:00
|
|
|
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
|
2014-10-20 02:57:30 +00:00
|
|
|
|
2011-05-13 04:54:01 +00:00
|
|
|
.include <bsd.kmod.mk>
|