aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-02-21 12:28:04 -0500
committerAvi Kivity <avi@qumranet.com>2007-03-04 04:12:42 -0500
commitf17abe9a44425ff9c9858bc1806cc09d6b5dad1c (patch)
tree47b060818bbea16dfecf21b8008a99c978a5f0c3 /include/linux/kvm.h
parent37e29d906c6eb1ece907e509160518b2edc2c083 (diff)
KVM: Create an inode per virtual machine
This avoids having filp->f_op and the corresponding inode->i_fop different, which is a little unorthodox. The ioctl list is split into two: global kvm ioctls and per-vm ioctls. A new ioctl, KVM_CREATE_VM, is used to create VMs and return the VM fd. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index f3604593fb76..d6e6635dbec1 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -224,7 +224,16 @@ struct kvm_dirty_log {
224 224
225#define KVMIO 0xAE 225#define KVMIO 0xAE
226 226
227/*
228 * ioctls for /dev/kvm fds:
229 */
227#define KVM_GET_API_VERSION _IO(KVMIO, 1) 230#define KVM_GET_API_VERSION _IO(KVMIO, 1)
231#define KVM_CREATE_VM _IO(KVMIO, 2) /* returns a VM fd */
232#define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list)
233
234/*
235 * ioctls for VM fds
236 */
228#define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) 237#define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run)
229#define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs) 238#define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs)
230#define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) 239#define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs)
@@ -238,6 +247,5 @@ struct kvm_dirty_log {
238#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log) 247#define KVM_GET_DIRTY_LOG _IOW(KVMIO, 12, struct kvm_dirty_log)
239#define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs) 248#define KVM_GET_MSRS _IOWR(KVMIO, 13, struct kvm_msrs)
240#define KVM_SET_MSRS _IOWR(KVMIO, 14, struct kvm_msrs) 249#define KVM_SET_MSRS _IOWR(KVMIO, 14, struct kvm_msrs)
241#define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 15, struct kvm_msr_list)
242 250
243#endif 251#endif