Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp659841iog; Wed, 15 Jun 2022 09:33:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vzEckzWiKA2AyQG3Jeovvh9RPVIUHm8shNeJFvq3bEmWNRyr2Z5ApZCNtxk1YHNgwKjVLX X-Received: by 2002:a65:48c6:0:b0:401:bf2a:6e0c with SMTP id o6-20020a6548c6000000b00401bf2a6e0cmr548263pgs.530.1655310801639; Wed, 15 Jun 2022 09:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655310801; cv=none; d=google.com; s=arc-20160816; b=JBrhAAjaQjYmNK6cukcOQdIt3VLuzn3KLJdPIWw3KMKKGZwCT3lM8XzKZ5w736HQoY KAFwsxua2e+mPqU8ycF5jWUBWHceG0Y+MJOYqC0PyjENrr291l7R9fSFp0CGPILPKcrw 2eVKA1Z1yKVBrJ1pUAFnHLKBrWMzgfw8GQPARNTfy/kFoTZAWt2aHYuQqCN2PR5NBZBP 5awqbCSFwW9Zvb6w5/lOtvkiu1RChjl4bzayjy65x4MBymaAZXA7KSBh2pbjl6b+dRxO tvCoB9L6yR5e/Qtr7RWZFyTXLUh0zk32XlVCGLFBuYV1enVFIqO9z3LTtDnLHE4FOWoc JQ6A== 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 :dkim-signature; bh=zJdvbt0aBdK6bAKpTTZF6q5B6doKAY+RexeCQadImIc=; b=1FP5b503Al5ZKkwsVIJg565ohtKtDU1sxY9SPohLq0efiYpG/JrRm7BaJg/oD/wxzV uXfpbgjBvcV2VnvWYfe2tbeau/Fdw96R182riiYl8NTcWZYnD68LBs1uRlYOneQ2VkDe Wujf/RPcrLtvApL/aORlPXAos5arFPcT2mS+9KVE01LgBDVkckki/KDDHSj2JJxnK667 Ys7U+Redfb6lwqDAasXmWPnD9EvACr/CSc2zcFzftuQbx8PvN40w/7DAzRoK3h1UUWxN gGDkE+eJlCuXE87h9CCDxWWOdobR93K2TnAn3gxvyt+gYoCKtrXgDSo/h/7u2PMh927a aDlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ih22+P5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a637a4c000000b00408af01cb44si5696151pgn.124.2022.06.15.09.33.09; Wed, 15 Jun 2022 09:33:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ih22+P5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1354724AbiFOQTr (ORCPT + 99 others); Wed, 15 Jun 2022 12:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355006AbiFOQTf (ORCPT ); Wed, 15 Jun 2022 12:19:35 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 998FACE17 for ; Wed, 15 Jun 2022 09:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655309974; x=1686845974; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=MCvI0tPa54YnwXT8fiikTfMGu5joUrBKkdhVfxRHttg=; b=ih22+P5rPvVWFzZ9z9UzfAFrLiKkDmPs/2jv2XZRmO2dIKKoDbAMIKzB Jvu3eXpVqFjgZtDppxLisDncm6J5xdZc7ht94qXmR//IB6d9RZ45+0r+I 2am29k0VMDOWBMQfT6ZhFjpU0Dbot2FktfJaqFJMMKG9XiszevyMu2UB0 lG0k3Iyjra8KIgRl33HhaSxI9zJYuYHsLGEakpQO0rmGKLdDM0dNzkaPJ 0V+xqTEZMwevx4vmHNEVdtmq0knO0bnCqLA5+JaVIb+XPAcVdHN7f2acK ls7K87wtNPqvuHkgoZqOxnxDxlDNnHoaB5YiSTQ31eVLDi23o4Uen3jlI g==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="262040071" X-IronPort-AV: E=Sophos;i="5.91,302,1647327600"; d="scan'208";a="262040071" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 09:19:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,302,1647327600"; d="scan'208";a="687384863" Received: from louislifei-optiplex-7090.sh.intel.com (HELO louislifei-OptiPlex-7090) ([10.239.146.218]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2022 09:19:28 -0700 Date: Thu, 16 Jun 2022 00:20:54 +0800 From: Li Fei1 To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, fei1.li@intel.com Subject: Re: [PATCH v1 1/1] virt: acrn: Mark the uuid field as unused Message-ID: <20220615162054.GA571776@louislifei-OptiPlex-7090> References: <20220607174120.34981-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220607174120.34981-1-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2022 at 08:41:20PM +0300, Andy Shevchenko wrote: > After the commits for userspace [1][2] the uuid field is not being > used in the ACRN code. Update kernel to reflect these changes. > I.e. we do the following: > - adding a comment explaining that it's not used anymore > - replacing the specific type by a raw buffer > - updating the example code accordingly > > [1]: https://github.com/projectacrn/acrn-hypervisor/commit/da0d24326ed6 > [2]: https://github.com/projectacrn/acrn-hypervisor/commit/bb0327e70097 > > Fixes: 5b06931d7f8b ("sample/acrn: Introduce a sample of HSM ioctl interface usage") > Fixes: 9c5137aedd11 ("virt: acrn: Introduce VM management interfaces") > Signed-off-by: Andy Shevchenko Signed-off-by: Fei Li > --- > include/uapi/linux/acrn.h | 5 ++--- > samples/acrn/vm-sample.c | 3 --- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/include/uapi/linux/acrn.h b/include/uapi/linux/acrn.h > index ccf47ed92500..04fa83647ae5 100644 > --- a/include/uapi/linux/acrn.h > +++ b/include/uapi/linux/acrn.h > @@ -12,7 +12,6 @@ > #define _UAPI_ACRN_H > > #include > -#include > > #define ACRN_IO_REQUEST_MAX 16 > > @@ -186,7 +185,7 @@ struct acrn_ioreq_notify { > * @reserved0: Reserved and must be 0 > * @vcpu_num: Number of vCPU in the VM. Return from hypervisor. > * @reserved1: Reserved and must be 0 > - * @uuid: UUID of the VM. Pass to hypervisor directly. > + * @uuid: Reserved (used to be UUID of the VM) > * @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. > @@ -198,7 +197,7 @@ struct acrn_vm_creation { > __u16 reserved0; > __u16 vcpu_num; > __u16 reserved1; > - guid_t uuid; > + __u8 uuid[16]; > __u64 vm_flag; > __u64 ioreq_buf; > __u64 cpu_affinity; > diff --git a/samples/acrn/vm-sample.c b/samples/acrn/vm-sample.c > index b2dad47a77a0..7abd68b20153 100644 > --- a/samples/acrn/vm-sample.c > +++ b/samples/acrn/vm-sample.c > @@ -29,8 +29,6 @@ static struct acrn_io_request *io_req_buf = (struct acrn_io_request *)io_request > > __u16 vcpu_num; > __u16 vmid; > -/* POST_STANDARD_VM_UUID1, refer to https://github.com/projectacrn/acrn-hypervisor/blob/master/hypervisor/include/common/vm_uuids.h */ > -guid_t vm_uuid = GUID_INIT(0x385479d2, 0xd625, 0xe811, 0x86, 0x4e, 0xcb, 0x7a, 0x18, 0xb3, 0x46, 0x43); > > int hsm_fd; > int is_running = 1; > @@ -63,7 +61,6 @@ int main(int argc, char **argv) > } > hsm_fd = open("/dev/acrn_hsm", O_RDWR|O_CLOEXEC); > > - memcpy(&create_vm.uuid, &vm_uuid, 16); > create_vm.ioreq_buf = (__u64)io_req_buf; > ret = ioctl(hsm_fd, ACRN_IOCTL_CREATE_VM, &create_vm); > printf("Created VM! [%d]\n", ret); > -- > 2.35.1 >