[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211001135644.1884-1-andriy.shevchenko@linux.intel.com>
Date: Fri, 1 Oct 2021 16:56:44 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Reinette Chatre <reinette.chatre@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shuo Liu <shuo.a.liu@...el.com>,
Zhi Wang <zhi.a.wang@...el.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org
Cc: Fei Li <fei1.li@...el.com>
Subject: [PATCH v1 1/1] virt: acrn: Drop internal kernel type from ABI
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 <andriy.shevchenko@...ux.intel.com>
---
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 <linux/types.h>
-#include <linux/uuid.h>
#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
Powered by blists - more mailing lists