Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2163471iof; Tue, 7 Jun 2022 21:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp6deXP7D/7NZqYBo8KcyV/7rSjSiZ9fXX1z3BnhYViV9aKCXF02a6uxJYCE4fl2WlqPKx X-Received: by 2002:a05:6a00:1ad2:b0:51b:c63b:95f0 with SMTP id f18-20020a056a001ad200b0051bc63b95f0mr31820339pfv.16.1654663937103; Tue, 07 Jun 2022 21:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663937; cv=none; d=google.com; s=arc-20160816; b=mZDle5Rd1IcD8Wxss4AKp9P4LgmG8Rp6RrEF5snnkGm8yCxFBNP1RlUwsSoofI+n3m nMFF8xcg1LYiiiYeIJxlls0ttXxJF+3DS/Wkh9WEcE8hVzBfG5FSaNrg+1iCeIKlF/s7 a7WhA2rAnGhe/8bE6gMwILG2ZK6VJb6Ol/6Uw5Z55RDwMuDE3LTakuiJcgmZLpnE6laz Kh2DV7E2DOo2fdVTay9aBc4CjQakArwstHLKWOZm+nR1o1Jki8j+FCIIjqrK+Dkd0NNn HUuMge3b8jkr6QU7/VZGsi10CYrFeDWAc/fDje4W2YbKMFBSXLR6fYAiV1F9/5M+i78h lbQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1M84WdA6aoJF/f6dE8ueXtW2BVLkbmAwhtRHGMfdGRs=; b=Aa0EsWrqXvwEOeTFZYt7/kJgTbX0yo6FE02BimzD//ckBuF61Je55/fHy6f7C5VVbW u1xep22S0TrMJ/yXlKd9IOxjTzu8CIjUSpgkx0hsEder0p0gAzrLpozS2ZnWHnDn/hMS KPDmSGoADlVPbYKOd9EesMM5ONnfFn5lur8Jmji6dueXsg5zhyliIRbvAQwUNPan8uMw tHl8AB+/+6mEzS7Dbrc6/l7J1y/NuzTsjh+pd4JothoBB2MfsPi/DKJWvDlXeFfAiPw+ A6h0Jx6og7Rp+caXcqWnr/PqBztDudfcf/ZVR8oya8rvq8Vv4j6PRJwrEGJCk7qQbaDl NbaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VgrkORMH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l191-20020a6391c8000000b003fc7f1808e2si26550216pge.332.2022.06.07.21.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:52:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VgrkORMH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF85B4528E5; Tue, 7 Jun 2022 21:21:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350303AbiFGSTm (ORCPT + 99 others); Tue, 7 Jun 2022 14:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349151AbiFGR6V (ORCPT ); Tue, 7 Jun 2022 13:58:21 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3059262131 for ; Tue, 7 Jun 2022 10:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654623680; x=1686159680; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=S/o/Tf/adtj61B1f4VPyjcLmTygV0lPEUGJMpY2idHQ=; b=VgrkORMHZrtgZMgDZOjw1KtITyv7D5GZCTkKiSI98WfrKUx9qK2DBUfT zMDXoZJ4TfPB8kTy/A6FefCgT9VOAH6zuj9neh4bhF0cGfoRMg6v3y5K1 3UskbvG5JfwmSIQ4ccE9T49ebReR7PHj/GvF5SqBRrKrAWDFYxB1XBlg0 smirDMFnkqrB0ZncovetDA3qU3LapzdA96nNO6rxdMSwbJFGqheVE3Jbl jPzBE65pKs7zTe79lkR/0M0yrKLIuDb3//RAKh3H+hMk2K1XHfV21OnkH eNEQw7kEwy06ftj9sWw2fRHFYwxZqZyJSnHXGAxqGdfdbNamwo/+EZXs0 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="363073969" X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="363073969" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 10:41:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,284,1647327600"; d="scan'208";a="826460235" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 07 Jun 2022 10:41:18 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6242D109; Tue, 7 Jun 2022 20:41:21 +0300 (EEST) From: Andy Shevchenko To: Shuo Liu , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Fei Li Subject: [PATCH v1 1/1] virt: acrn: Mark the uuid field as unused Date: Tue, 7 Jun 2022 20:41:20 +0300 Message-Id: <20220607174120.34981-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 --- 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