> > I think KVM_CREATE_VCPU should return VCPU fd, right? AFAIK, in KVM > > world, kvm_fd usually means the fd we get after opening "/dev/kvm". > > Just want to make sure I understand the code correcly. Thanks. > > This is the kvm_fd inside struct CPUState, so it's per-CPU.
Okay, then it's VCPU fd. Don't know rename it or add a comment to indicate it's a VCPU fd is a good idea. ;) Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj