From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70290C433F5 for ; Fri, 1 Oct 2021 13:57:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D8BB611C8 for ; Fri, 1 Oct 2021 13:57:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231776AbhJAN7A (ORCPT ); Fri, 1 Oct 2021 09:59:00 -0400 Received: from mga11.intel.com ([192.55.52.93]:61582 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbhJAN67 (ORCPT ); Fri, 1 Oct 2021 09:58:59 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="222238877" X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="222238877" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 06:57:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="565017598" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 01 Oct 2021 06:57:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E76941AD; Fri, 1 Oct 2021 16:57:17 +0300 (EEST) From: Andy Shevchenko To: Reinette Chatre , Greg Kroah-Hartman , Shuo Liu , Zhi Wang , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Fei Li Subject: [PATCH v1 1/1] virt: acrn: Drop internal kernel type from ABI Date: Fri, 1 Oct 2021 16:56:44 +0300 Message-Id: <20211001135644.1884-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org guid_t is internal type of the kernel which is mistakenly had been exposed to the user space. Replace it with raw buffers. Besides that it's obvious from the link in the sample code, that the real use is of uuid_t type, but because uuid_t hasn't exposed, so should guid_t, the code includes and uses wrong type. 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 | 3 +-- samples/acrn/vm-sample.c | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/acrn.h b/include/uapi/linux/acrn.h index 353b2a2e4536..4312af1b8013 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 @@ -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..1639fcadc766 100644 --- a/samples/acrn/vm-sample.c +++ b/samples/acrn/vm-sample.c @@ -30,7 +30,10 @@ 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); +__u8 vm_uuid[16] = { + 0xd2, 0x79, 0x54, 0x38, 0x25, 0xd6, 0x11, 0xe8, + 0x86, 0x4e, 0xcb, 0x7a, 0x18, 0xb3, 0x46, 0x43, +}; int hsm_fd; int is_running = 1; -- 2.33.0