diff options
authorGlauber Costa <>2009-07-15 01:31:23 -0400
committerMarcelo Tosatti <>2009-07-21 16:58:33 -0300
commitea906fb1e826a20ad4e576d713146d891b6d82d7 (patch)
tree283234e5b3cda456afa1eb4b0a751f509b71e8dd /kvm-all.c
parentremove kvm types from handle unhandled (diff)
reuse kvm_vm_ioctl
Start using kvm_vm_ioctl's code. For type safety, delete vm_fd from kvm_context entirely, so the compiler can play along with us helping to detect errors I might have made. Also, we were slightly different from qemu upstream in handling error code from ioctl, since we were always testing for -1, while kvm_vm_ioctl returns -errno. We already did this in most of the call sites, so this patch has the big advantage of simplifying call sites. Diffstat says: 4 files changed, 58 insertions(+), 134 deletions(-) Signed-off-by: Glauber Costa <> Signed-off-by: Marcelo Tosatti <>
Diffstat (limited to 'kvm-all.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 67908a74c..9373d991c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -809,6 +809,7 @@ int kvm_ioctl(KVMState *s, int type, ...)
return ret;
int kvm_vm_ioctl(KVMState *s, int type, ...)
@@ -827,6 +828,7 @@ int kvm_vm_ioctl(KVMState *s, int type, ...)
return ret;
int kvm_vcpu_ioctl(CPUState *env, int type, ...)
int ret;