Friday, November 1, 2013

QEMU Source Code Study (3) - KVM_CREATE_VCPU

x86_cpu_register_types() ----> type_register_static(&x86_cpu_type_info) ----> TypeInfo x86_cpu_type_info.class_init = x86_cpu_common_class_init ----> x86_cpu_common_class_init(ObjectClass *oc, void *data) ----> dc->realize = x86_cpu_realizefn ----> x86_cpu_realizefn(DeviceState *dev, Error **error) ----> qemu_init_vcpu(cpu) ----> qemu_kvm_start_vcpu(cpu) ----> qemu_thread_create(cpu->thread, qemu_kvm_cpu_thread_fn, cpu) ----> nqemu_kvm_cpu_thread_fn(arg) ----> kvm_cpu_exec(cpu) ----> kvm_vcpu_ioctl(cpu, KVM_RUN, 0);


How to execute these object?


QEMU Part



kvm_init_vcpu(...)


KVM Part



kvm_vm_ioctl()


kvm_vm_ioctl_create_vcpu(kvm, id)


kvm_x86_ops


vmx_create_vcpu

No comments:

Post a Comment