Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b76e20b27d20f7cb240e6b1b2dbebaa1b7f9b60 Commit: 0b76e20b27d20f7cb240e6b1b2dbebaa1b7f9b60 Parent: 0f8e3d365a30a8788d4c348e2885bac9640bf4d0 Author: Avi Kivity <[EMAIL PROTECTED]> AuthorDate: Fri Dec 22 01:06:02 2006 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Fri Dec 22 08:55:46 2006 -0800
[PATCH] KVM: API versioning Add compile-time and run-time API versioning. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 3 +++ include/linux/kvm.h | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index bc2e6c1..9f24f22 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -1603,6 +1603,9 @@ static long kvm_dev_ioctl(struct file *filp, int r = -EINVAL; switch (ioctl) { + case KVM_GET_API_VERSION: + r = KVM_API_VERSION; + break; case KVM_CREATE_VCPU: { r = kvm_dev_ioctl_create_vcpu(kvm, arg); if (r) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 5bb2c3c..28fdce1 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -11,6 +11,8 @@ #include <asm/types.h> #include <linux/ioctl.h> +#define KVM_API_VERSION 1 + /* * Architectural interrupt line count, and the size of the bitmap needed * to hold them. @@ -209,6 +211,7 @@ struct kvm_dirty_log { #define KVMIO 0xAE +#define KVM_GET_API_VERSION _IO(KVMIO, 1) #define KVM_RUN _IOWR(KVMIO, 2, struct kvm_run) #define KVM_GET_REGS _IOWR(KVMIO, 3, struct kvm_regs) #define KVM_SET_REGS _IOW(KVMIO, 4, struct kvm_regs) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html