[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Does kvm_fd mean KVM or VCPU fd?
From: |
Wei-Ren Chen |
Subject: |
[Qemu-devel] Does kvm_fd mean KVM or VCPU fd? |
Date: |
Thu, 14 Jun 2012 16:24:44 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi all,
While reading KVM releated code in QEMU, I found the name of one
field in CPU_COMMON (cpu-defs.h), i.e. kvm_fd, might be misleading.
See the code below,
---
int kvm_init_vcpu(CPUArchState *env)
{
ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpu_index);
env->kvm_fd = ret; /* VCPU fd? */
}
---
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.
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
- [Qemu-devel] Does kvm_fd mean KVM or VCPU fd?,
Wei-Ren Chen <=