Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp38390pxb; Mon, 31 Jan 2022 14:35:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUdkRl56di1X3UfAGzzbBKX0W54k3fh8fERMf0JbCR8pcJDDD19mQ/4S2vF0eOvh14BM7y X-Received: by 2002:a05:6402:278f:: with SMTP id b15mr23122110ede.103.1643668546408; Mon, 31 Jan 2022 14:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643668546; cv=none; d=google.com; s=arc-20160816; b=owftf45yTMqxbECNUiZYTQqKclgDxhSva4CHYXp+BcKKH/9XM6fwuJLyW3zWftWFsm 6q3GcXsMymNJAh2QnJrDTNTTpSll1MjRltFpHRm35ci7OUjvHhSX338PN0cMxbibZUci UwOyDVWM/Mf5iTTCOCRABbPgXFmAlkHME1Gopx+TuUWJf+2Al8gEHRcKQOCCT81kiNx7 hB9q7zHLlcgOSv++sTbdHUsE64S8kDl7rdgNZTQiLwuG/QIAf2Z6LW3NJcb4oOS+GT4c umFvpf4k4HN5vJGN7U80L+r+AAK1dUf7Lc6bTTYnOwjXy5NAlis9itJ9+BOSlmi/kVjb 2SpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=SbYXh7WTaUVWRtmEkBEemhd2SWqUM58JKqemGa+2nQk=; b=gVMVG+i+0I4DUB06Jru2cGSu5a4ZoDN85gPvXK0bIczELPqR7tasLdwwh8Z6rY5dnu j6WIjYhLgnRv+/7RHhGOZmsYIZ1o21enNE9mRI+TXJkcMqXJn0hHYsj/NaLHkFYhyAez 6nFe+MDL7/aeYPyQ4A0305qKmXKGrt6Usga9BlTDynLHl1a6SVEwCYnAfYCc0rhcmzeR FtL7/s8orfyYmRGrIkHqi1fjVPQuxuj7xmMS6kWSyI6wO1RGXd90lmn2ooscIAwlNYyt rf7l/bJcuWsIQjDWMHYjOuZEvGe5zBZtf2xiSDjiov23E/koK7HozdbYN40C/Uic4AA3 H6RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GbtAM7zy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si8592649ejj.714.2022.01.31.14.35.21; Mon, 31 Jan 2022 14:35:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GbtAM7zy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352051AbiA2BfR (ORCPT + 99 others); Fri, 28 Jan 2022 20:35:17 -0500 Received: from mga01.intel.com ([192.55.52.88]:2662 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352031AbiA2BfQ (ORCPT ); Fri, 28 Jan 2022 20:35:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643420116; x=1674956116; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qMy5y86mw+A/NGGUbaCdJHeBtrkxEidZHOoXYgeJm6A=; b=GbtAM7zyMnKXTsrO2w4vBGqrtvYEu+5t9gG3BzyhlBx/DFpyio0e4wXQ W3pMA8uWHWpkfWKvjp/iu3Nzv4BQsVQqQK2wB5Yvtv0KVdNLsPmDjYFqc kq5jbb9HA1o/qr0wEph3jmDFKI2YBcmhbhq6dUAUBzKwjA2nvwAo3M2jQ qXX6BH7X8uikCDRh5nbbEi2APW9kRxNhPpIpfVqeyGfyw0pfUGpLtfami kHxfQPSDHmkMBBA7/SsS+Sj7oqusl+6lDVsb3i2NLdjhQXUOKi47grRUU 2lEiRAt9zl1BGTso9vzYFDfLnsISOqjli/1GYypBtVgRsg5rdOGeDNnv/ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10241"; a="271691369" X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="271691369" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 17:35:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="770272078" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 28 Jan 2022 17:35:16 -0800 Received: from shsmsx604.ccr.corp.intel.com (10.109.6.214) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 28 Jan 2022 17:35:15 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX604.ccr.corp.intel.com (10.109.6.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 29 Jan 2022 09:35:13 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2308.020; Sat, 29 Jan 2022 09:35:13 +0800 From: "Wang, Wei W" To: Janosch Frank , "linux-kernel@vger.kernel.org" CC: "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "Zeng, Guang" , "Liu, Jing2" , "Tian, Kevin" , "seanjc@google.com" , "tglx@linutronix.de" , "Zhong, Yang" Subject: RE: [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of kvm.h Thread-Topic: [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of kvm.h Thread-Index: AQHYFF2HAjhbV221DEecjLl79IeG66x5LLxg Date: Sat, 29 Jan 2022 01:35:13 +0000 Message-ID: References: <20220128154025.102666-1-frankja@linux.ibm.com> In-Reply-To: <20220128154025.102666-1-frankja@linux.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 t= hem 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 upda= te 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 Thanks, Wei