kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Wang, Wei W" <wei.w.wang@intel.com>
To: Janosch Frank <frankja@linux.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Zeng, Guang" <guang.zeng@intel.com>,
	"Liu, Jing2" <jing2.liu@intel.com>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Zhong, Yang" <yang.zhong@intel.com>
Subject: RE: [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of kvm.h
Date: Sat, 29 Jan 2022 01:35:13 +0000	[thread overview]
Message-ID: <c3d33dc642834f1db0a51e97fcc7f455@intel.com> (raw)
In-Reply-To: <20220128154025.102666-1-frankja@linux.ibm.com>

On Friday, January 28, 2022 11:40 PM, Janosch Frank wrote:
> This way we can more easily find the next free IOCTL number when adding
> new IOCTLs.

Yes, this is good, but sometimes the relevant code tend to be put together (e.g. ioctl for vm fd and ioctls for vcpu fds), so not necessary to force them to be put in the number order.
I think it would be better to record the last used number in the comment on top, and new additions need to update it (similar to the case that we update the api doc):

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 9563d294f181..b7e5199ec47e 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -6,6 +6,9 @@
  * Userspace interface for /dev/kvm - kernel based virtual machine
  *
  * Note: you must update KVM_API_VERSION if you change this interface.
+ *
+ * Last used cap number: KVM_CAP_XSAVE2(208)
+ * Last used ioctl number: KVM_HAS_DEVICE_ATTR(0xe3)
  */

 #include <linux/const.h>

Thanks,
Wei

  reply	other threads:[~2022-01-29  1:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 15:40 [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of kvm.h Janosch Frank
2022-01-29  1:35 ` Wang, Wei W [this message]
2022-01-31  6:28   ` Janosch Frank
2022-01-31 14:22 ` Paolo Bonzini

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=c3d33dc642834f1db0a51e97fcc7f455@intel.com \
    --to=wei.w.wang@intel.com \
    --cc=frankja@linux.ibm.com \
    --cc=guang.zeng@intel.com \
    --cc=jing2.liu@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=yang.zhong@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).