Background: I recently worked on a virtual machine security project that uses KVM to support virtualization, involving code modifications for KVM and qemu. Because KVM can be loaded into the kernel as a module, You can compile the KVM module separately, instead of re-compiling the kernel each time (in view of the time spent in compiling the kernel, if the kernel needs to be re-compiled every time you change KVM, it is estimated that the program will be finished and the hair will be white)
Reference: http://blog.chinaunix.net/uid-23390992-id-3300514.html
My improvements:
1. Clean up
Make clean config_kvm = m config_intel_kvm = m-C/home/KVM/linux-3.14.5 M =/home/KVM/linux-3.14.5/ARCH/x86/KVM
2. Compile
Make config_kvm = m config_intel_kvm = m-C/home/KVM/linux-3.14.5 M =/home/KVM/linux-3.14.5/ARCH/x86/KVM
3.Generate KVM under the arch/x86/KVM directory. ko and kvm-intel.ko generated two module files, copy to/lib/modules/$ (uname-R)/kernel/ARCH/x86/KVM directory
4.Run depmod-a to reconfigure the module dependency
5.Modprobe KVM; modprobe kvm_intel Load two modules
(/Home/KVM/linux-3.14.5 is the path of the Linux source code)
Application Scenario: KVM Development