Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp640178pxb; Tue, 1 Feb 2022 07:30:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVxB31gD3P5uhk/sHC8NDRdU7Td2dN4F+K9pQa+1G9Zf4WLksLdr94sr0aYzHkv/HSgF9e X-Received: by 2002:a63:748:: with SMTP id 69mr20781564pgh.166.1643729410263; Tue, 01 Feb 2022 07:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643729410; cv=none; d=google.com; s=arc-20160816; b=NTkJAhZ1aWvz9PKgXq0p3Dkijs5hO+LmmbbhRrMmecBeu9+8lT+GZbqU0ivl69hWGn FQcHsEDtJrz72ZJXuPj7QsI8azzB1ApSobiR8Ojsc/SxNZd9Dt3UDWvWZF78aLzd2HDA 9N9eomAqPZrEMHAK4KYJSZVdgG4YBrlfeceQF5IMqCsIdZS9utcMrT307TQ3NXS10WFh ZLR8bbiYNe738bGHqWA+CtdYNOxUptTRg7ieuG4paLi2FcGtpxoyyujpKgJ7Jc7rXv5r jiKInxlLupXr6lYBcQCU9YsFlL5ukovHJKp3cQCaQ7VHMIN0uYhAY52IOJTpBZ/2AtZi XijA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=eUhecKHADsLAziDcn2A2MjDV9PiSGwe2pY0yZ3BvhsM=; b=flO+xLm00/aUK5K2gm/3IdHlayE3Weh795d3vSimTxTcTt62wNJ2oOHA1VaUkPwPPG PUNA8Y4/hIZ008uqLxZTI28SLFtV51/hRBihUQkrBqUFRgDl2kvvbJo7sDvZWa76Zffg 6Ds1NAPhw4XnKRtQRpGXDmShGuylHS/p+UHE6f7AJxMJvzycrMdM8wDb0WZMebZGbVkh 35okfSaRpi6OaV4hYE7FCRf3go4Qb6AgTCvgG4Ewcu1jFTY+yMpY49Gr0zjAwFo3hSga k+9RGh+CquqY0ACXsgZ7XwJjbXFjcX+ofTgECDp1mblb0Iq2YgbZraMgt6iCg+xAfpUN sBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=EresMLS8; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h129si16839744pgc.336.2022.02.01.07.29.57; Tue, 01 Feb 2022 07:30:10 -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=@ibm.com header.s=pp1 header.b=EresMLS8; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235808AbiAaG3A (ORCPT + 99 others); Mon, 31 Jan 2022 01:29:00 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:8048 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235225AbiAaG27 (ORCPT ); Mon, 31 Jan 2022 01:28:59 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20V37huu030704; Mon, 31 Jan 2022 06:28:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : to : cc : references : from : subject : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=eUhecKHADsLAziDcn2A2MjDV9PiSGwe2pY0yZ3BvhsM=; b=EresMLS86GtpyVyuoOG7UX44LcoVfa2J+Aefz3fd4Tw63WwGa+dsbkjsRSM1YdB290JE A3EzB33emIEgPmAEsuyq+O+S75RiHW7hSsu9W7irNEa/9DOl07isfXs93B7cnREVUTy8 0Gpws3L1wYpVQkuW2CP51dFjX5vM5bZZ3YKQOM1AnZnyqVOAzve055a2T0JPJiGGn5cE tfpT8IN1DfOk6fd5dCBy5bAijaHUR0oswCDilOFc+wfPMdGcR6F4b7k1/x8SKFANy1yY KU8yHf3MQCTmPhNuo7b9qyAAe8QQuXXia7TEJv+PYpxeUE/deCdzmdeHtCxa/X9s9sMO 5g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dx33wnxy4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 06:28:46 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20V5tG7d007301; Mon, 31 Jan 2022 06:28:45 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dx33wnxxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 06:28:45 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20V6S9fX029676; Mon, 31 Jan 2022 06:28:43 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3dvvuj0cvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 06:28:43 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20V6Issc49480010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 31 Jan 2022 06:18:54 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7EE7A4204B; Mon, 31 Jan 2022 06:28:40 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10E604205C; Mon, 31 Jan 2022 06:28:40 +0000 (GMT) Received: from [9.145.20.2] (unknown [9.145.20.2]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 31 Jan 2022 06:28:39 +0000 (GMT) Message-ID: <39b7d004-fb2d-f0e2-bd3b-43c503f87578@linux.ibm.com> Date: Mon, 31 Jan 2022 07:28:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-US To: "Wang, Wei W" , "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" References: <20220128154025.102666-1-frankja@linux.ibm.com> From: Janosch Frank Subject: Re: [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of kvm.h In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: D-QciCJ-0LFouusBTYT_3tc_YRVNKGCl X-Proofpoint-ORIG-GUID: v4QRXuvkbnaHPXqBW31Nw9XYAYI6TX4c X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-31_02,2022-01-28_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 impostorscore=0 mlxlogscore=985 malwarescore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201310043 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/29/22 02:35, Wang, Wei W wrote: > 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): It's not only the fact that it's not at the end, it's also in the middle of a block of s390 IOCTLs which are not relevant for this x86 IOCTL. Allowing an arbitrary order makes searching and adding harder. Imagine we'd start grouping capabilities. Let's not go there. > > 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 >