KVM在linux3.6.6中支持

KVM模塊編譯的Makefile文件在/arch/x86/kvm/Makefile  內容如下

ccflags-y += -Ivirt/kvm -Iarch/x86/kvm

CFLAGS_x86.o := -I.
CFLAGS_svm.o := -I.
CFLAGS_vmx.o := -I.

kvm-y   += $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
    coalesced_mmio.o irq_comm.o eventfd.o \
    assigned-dev.o)
kvm-$(CONFIG_IOMMU_API) += $(addprefix ../../../virt/kvm/, iommu.o)
kvm-$(CONFIG_KVM_ASYNC_PF) += $(addprefix ../../../virt/kvm/, async_pf.o)

kvm-y   += x86.o mmu.o emulate.o i8259.o irq.o lapic.o \
      i8254.o timer.o cpuid.o pmu.o
kvm-intel-y  += vmx.o
kvm-amd-y  += svm.o

obj-$(CONFIG_KVM) += kvm.o
obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
obj-$(CONFIG_KVM_AMD) += kvm-amd.o

 

配置選項在/arch/x86/kvm/Kconfig 內容如下

#
# KVM configuration
#

source "virt/kvm/Kconfig"

menuconfig VIRTUALIZATION
 bool "Virtualization"
 depends on HAVE_KVM || X86
 default y
 ---help---
   Say Y here to get to see options for using your Linux host to run other
   operating systems inside virtual machines (guests).
   This option alone does not add any kernel code.

   If you say N, all options in this submenu will be skipped and disabled.

if VIRTUALIZATION

config KVM
 tristate "Kernel-based Virtual Machine (KVM) support"
 depends on HAVE_KVM
 # for device assignment:
 depends on PCI
 # for TASKSTATS/TASK_DELAY_ACCT:
 depends on NET
 select PREEMPT_NOTIFIERS
 select MMU_NOTIFIER
 select ANON_INODES
 select HAVE_KVM_IRQCHIP
 select HAVE_KVM_EVENTFD
 select KVM_APIC_ARCHITECTURE
 select KVM_ASYNC_PF
 select USER_RETURN_NOTIFIER
 select KVM_MMIO
 select TASKSTATS
 select TASK_DELAY_ACCT
 select PERF_EVENTS
 select HAVE_KVM_MSI
 ---help---
   Support hosting fully virtualized guest machines using hardware
   virtualization extensions.  You will need a fairly recent
   processor equipped with virtualization extensions. You will also
   need to select one or more of the processor modules below.

   This module provides access to the hardware capabilities through
   a character device node named /dev/kvm.

   To compile this as a module, choose M here: the module
   will be called kvm.

   If unsure, say N.

config KVM_INTEL
 tristate "KVM for Intel processors support"
 depends on KVM
 # for perf_guest_get_msrs():
 depends on CPU_SUP_INTEL
 ---help---
   Provides support for KVM on Intel processors equipped with the VT
   extensions.

   To compile this as a module, choose M here: the module
   will be called kvm-intel.

config KVM_AMD
 tristate "KVM for AMD processors support"
 depends on KVM
 ---help---
   Provides support for KVM on AMD processors equipped with the AMD-V
   (SVM) extensions.

   To compile this as a module, choose M here: the module
   will be called kvm-amd.

config KVM_MMU_AUDIT
 bool "Audit KVM MMU"
 depends on KVM && TRACEPOINTS
 ---help---
  This option adds a R/W kVM module parameter 'mmu_audit', which allows
  audit  KVM MMU at runtime.

# OK, it's a little counter-intuitive to do this, but it puts it neatly under
# the virtualization menu.
source drivers/vhost/Kconfig
source drivers/lguest/Kconfig

endif # VIRTUALIZATION

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章