From: Avi Kivity <avi@qumranet.com>
To: kvm-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, mingo@elte.hu
Subject: [PATCH 5/5] KVM: API versioning
Date: Thu, 21 Dec 2006 09:50:05 -0000 [thread overview]
Message-ID: <20061221095005.097E0250048@il.qumranet.com> (raw)
In-Reply-To: <458A57A4.9000807@qumranet.com>
Add compile-time and run-time API versioning.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/kvm_main.c
===================================================================
--- linux-2.6.orig/drivers/kvm/kvm_main.c
+++ linux-2.6/drivers/kvm/kvm_main.c
@@ -1603,6 +1603,9 @@ static long kvm_dev_ioctl(struct file *f
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)
Index: linux-2.6/include/linux/kvm.h
===================================================================
--- linux-2.6.orig/include/linux/kvm.h
+++ linux-2.6/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)
next prev parent reply other threads:[~2006-12-21 9:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 9:45 [PATCH 0/5] KVM: Updates Avi Kivity
2006-12-21 9:46 ` [PATCH 1/5] KVM: Use more traditional error handling in kvm_mmu_init() Avi Kivity
2006-12-21 9:47 ` [PATCH 2/5] KVM: Do not export unsupported msrs to userspace Avi Kivity
2006-12-21 9:48 ` [PATCH 3/5] KVM: Force real-mode cs limit to 64K Avi Kivity
2006-12-21 9:49 ` [PATCH 4/5] KVM: Handle p5 mce msrs Avi Kivity
2006-12-21 9:50 ` Avi Kivity [this message]
2006-12-28 12:32 ` [patch] kvm: fix GFP_KERNEL alloc in atomic section bug Ingo Molnar
2006-12-28 12:44 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061221095005.097E0250048@il.qumranet.com \
--to=avi@qumranet.com \
--cc=akpm@osdl.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®