Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp231623pxb; Wed, 4 Nov 2020 20:59:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyxthiy3EZL0eUwtGLcqasKckDms5Oi3NrKStWE4m/hnMgVYX65/V0EAkj98P9JletluB8 X-Received: by 2002:a17:906:6a57:: with SMTP id n23mr581163ejs.315.1604552370088; Wed, 04 Nov 2020 20:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604552370; cv=none; d=google.com; s=arc-20160816; b=GKHH6sYiOJbHboa0zW3/ugZ4z1El3qV5OCTEoB1mCiheWN+qnPC+beNMYQvwei9nVq hrDeRR8lLCSJBMJtUogzpkieCprYBAcm4+rTm2ygKrskTJePw8B4N4/opzTF+QYEFDn/ UGa2CHXu7l+j9I3iUpZKiFPtIGGtKDJDINfCqur9KdMY/4A72QNPPb3VKjcEA3Ns+VYY hjPyWueTLzboXO/DM1jqas6OUWpnaqE1T2BCXu7RjTgGDJ+4LjSPdP7hJej9ZEbdzwtV ZDcX0lgqVwMo2p1ClyW6RY2c5JE2fHhZzdbF4IEBR7YBY8qxssmAEJO6UNFuBITsiFlO q/WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=YAA4KD/bCSGkhUnd4voT26mTwUxfNQeDYTKSYRTsMH8=; b=QOSFZ5qk7YVJzslKv0rsRh/SYOTerSihwWx3cfT3TXYnrnPR+oj0Vpe7lvDbTRU/cA wfQ8DwTojlOF1HkKPUQyaShssUROh5ux52m6cM7FsJTrGx1uO8kv2Kt3S1ijFezxAHeq uq0faBHmZBVNu/s21IZE3jE/5Ryr4BRNkEv2rMnT8w9YDU7bJy1HZlzJqZkL6RQq7GyB ZzgzojG2T6Rxmk6y/YR+KM6tq/0SFzd6t2njL8hEc27RH4G7jamphVHYYrAPSKAqtlis 13G6K3l65Xpu0NOD6cCagPztjfZw8MTxc3xHxaWwKoLpRMpPSWmnhOauCeWs5W8l9wrG HnCg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 dt26si319091ejb.284.2020.11.04.20.59.07; Wed, 04 Nov 2020 20:59:30 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388436AbgKEDKg (ORCPT + 99 others); Wed, 4 Nov 2020 22:10:36 -0500 Received: from mga07.intel.com ([134.134.136.100]:32196 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731175AbgKEDKf (ORCPT ); Wed, 4 Nov 2020 22:10:35 -0500 IronPort-SDR: 0NXL0gcFcheiarqnu58mvD03D352BgQl3DkW1roAEKquaYHhNHtpLHii31I4Zz28tLxybnzTrB lNepqaL3BbpQ== X-IronPort-AV: E=McAfee;i="6000,8403,9795"; a="233480532" X-IronPort-AV: E=Sophos;i="5.77,452,1596524400"; d="scan'208";a="233480532" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 19:10:35 -0800 IronPort-SDR: 5dmCqo1BSQtpGjxLQCtGG7vH92Y0IBfZXaSsmb1vuvHbOEC+X3IUHZG12SGwHiYriROQF/NvgC 0zK8BGcvoYQQ== X-IronPort-AV: E=Sophos;i="5.77,452,1596524400"; d="scan'208";a="539191049" Received: from shuo-intel.sh.intel.com (HELO localhost) ([10.239.154.30]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 19:10:32 -0800 Date: Thu, 5 Nov 2020 11:10:29 +0800 From: Shuo A Liu To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sean Christopherson , Yu Wang , Reinette Chatre , Zhi Wang , Zhenyu Wang Subject: Re: [PATCH v5 06/17] virt: acrn: Introduce VM management interfaces Message-ID: <20201105031029.GB17702@shuo-intel.sh.intel.com> References: <20201019061803.13298-1-shuo.a.liu@intel.com> <20201019061803.13298-7-shuo.a.liu@intel.com> <20201104190235.GA2855400@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201104190235.GA2855400@kroah.com> User-Agent: Mutt/1.8.3 (2017-05-23) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 4.Nov'20 at 20:02:35 +0100, Greg Kroah-Hartman wrote: >On Mon, Oct 19, 2020 at 02:17:52PM +0800, shuo.a.liu@intel.com wrote: >> --- /dev/null >> +++ b/include/uapi/linux/acrn.h >> @@ -0,0 +1,56 @@ >> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ >> +/* >> + * Userspace interface for /dev/acrn_hsm - ACRN Hypervisor Service Module >> + * >> + * This file can be used by applications that need to communicate with the HSM >> + * via the ioctl interface. >> + */ >> + >> +#ifndef _UAPI_ACRN_H >> +#define _UAPI_ACRN_H >> + >> +#include >> + >> +/** >> + * struct acrn_vm_creation - Info to create a User VM >> + * @vmid: User VM ID returned from the hypervisor >> + * @reserved0: Reserved >> + * @vcpu_num: Number of vCPU in the VM. Return from hypervisor. >> + * @reserved1: Reserved >> + * @uuid: UUID of the VM. Pass to hypervisor directly. >> + * @vm_flag: Flag of the VM creating. Pass to hypervisor directly. >> + * @ioreq_buf: Service VM GPA of I/O request buffer. Pass to >> + * hypervisor directly. >> + * @cpu_affinity: CPU affinity of the VM. Pass to hypervisor directly. >> + * @reserved2: Reserved > >Reserved and must be 0? Not a must. >What are they reserved for? > >Same for all of the reserved fields, why? Some reserved fields are to map layout in the hypervisor side, others are for future use. > >> + */ >> +struct acrn_vm_creation { >> + __u16 vmid; >> + __u16 reserved0; >> + __u16 vcpu_num; >> + __u16 reserved1; >> + __u8 uuid[16]; > >We have a userspace-visable uid structure in include/uapi/uuid.h, why >not use that? we just pass the uuid data from user space to hypervisor. So, we can remove a header dependeny with using raw data format. Thanks shuo