Use of anon_inode_getfd in KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All, 

I trying to understand the KVM code.

In userland code kvm_init() creates a VM by calling kvm_ioctl(KVM_CREATE_VM).

The character device ioctl operation (kvm_dev_ioctl). Creates a new VM using kvm_create_vm(). The ioctl call also creates an anonymous file with name 'kvm-vm'. This newly created file's operations pointer point to kvm_vm_fops. The FD of the file is returned as return value of the IOCTL call.

Then userland uses this new fd for next IOCTL operation KVM_CREATE_VCPU. Which again creates another anonymous file and also associates a new set of file operations with the file.

I kindly request to please explain why so many different FD's are used?
Why can't the /dev/kvm ioctl be used to create VM, VCPU?
Some part of the userland code was marked obsolete, is VCPU way of handling is obsolete in the latest kernel?

IMHO there is no document or article describing the design of KVM. If someone has one, I request to share it.

Thanks and Regards,
Prasad Joshi (Student ID: 19015523)
MRes Systems Engineering


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux