at the last post of this section, i posted kvm has  two parts. i.e) kvm kernel and QEMU for guest, and also where to start analyzing kvm kernel as a kernel modules.

in this post, i'm just about to analyze kvm_init.

kvm_init is doing as following functions.

1. kvm_arch_init: initialize architecture oriented operation

2. kvm_irqfd_init: initialize interrupt, but but nothing to do with this. i have no idea why doing nothing.

3. zalloc_cpumask_var: cpu mask variable initialization.

4. kvm_arch_hardware_setup: architecture oriented hardware setup. in case of x86, it will call "kvm_x86_ops->hardware_setup()" function in x86.c,  already initialized in kvm_init, kvm_arch_init(opaque), hardware_setup was set up in svm.c or vmx.c

5. kmem_cache_create: creating kernel cache for kvm vcpu

you can see hole init_kvm functions on mygithub

Posted by MeatNBrew
l