KVM: Add method to check for backwards-compatible API extensions
authorAvi Kivity <avi@qumranet.com>
Thu, 1 Mar 2007 15:56:20 +0000 (17:56 +0200)
committerAvi Kivity <avi@qumranet.com>
Thu, 3 May 2007 07:52:24 +0000 (10:52 +0300)
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
include/linux/kvm.h

index 5d24203afd204bca89cf050d8538dfb6589becf9..39cf8fd343a3113a8ed9e61b075138dbcf014ab2 100644 (file)
@@ -2416,6 +2416,12 @@ static long kvm_dev_ioctl(struct file *filp,
                r = 0;
                break;
        }
+       case KVM_CHECK_EXTENSION:
+               /*
+                * No extensions defined at present.
+                */
+               r = 0;
+               break;
        default:
                ;
        }
index 93472daec12090b738abaf233861a06f2952e93f..c93cf53953afd8e92673f14ffc22930cbe746453 100644 (file)
@@ -232,6 +232,11 @@ struct kvm_cpuid {
 #define KVM_GET_API_VERSION       _IO(KVMIO,   0x00)
 #define KVM_CREATE_VM             _IO(KVMIO,   0x01) /* returns a VM fd */
 #define KVM_GET_MSR_INDEX_LIST    _IOWR(KVMIO, 0x02, struct kvm_msr_list)
+/*
+ * Check if a kvm extension is available.  Argument is extension number,
+ * return is 1 (yes) or 0 (no, sorry).
+ */
+#define KVM_CHECK_EXTENSION       _IO(KVMIO,   0x03)
 
 /*
  * ioctls for VM fds