Separately compile the KVM Module

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.