A question about kvm module
I am not good at tracing code really, if anyone can give me some advice that will be very helpful.:(
A qemu process in user space enters kernel space by calling "ioctl(env->kvm_fd, KVM_RUN, 0)"(kvm-all.c, function kvm_cpu_exec), which is corresponding to a switch option in function "kvm_vcpu_ioctl" in kernel module sources of kvm. I would like to know that, what happened inside the kernel during this call? the ioctl called in user space just passed an file descriptor, but in function "kvm_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)" there already an struct file pointer existed, and I don't know when and how the filp->private_data was set. HOW the filp->private_data is set is specifically important to me.
Is there anyone experience in these virtualization stuff? Thanks a lot.