Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 1dbb4f0

Browse files
andy-shevgregkh
authored andcommitted
virt: acrn: Mark the uuid field as unused
After the commits for userspace (see Link tags below) the uuid field is not being used in the ACRN code. Update kernel to reflect these changes, i.e. 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 The advertised field confused users and actually never been used. So the wrong part here is that kernel puts something which userspace never used and hence this may confuse a reader of this code. Note, that there is only a single tool that had been prepared a year ago for these forthcoming changes in the kernel. Link: projectacrn/acrn-hypervisor@da0d24326ed6 Link: projectacrn/acrn-hypervisor@bb0327e70097 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20221116162956.72658-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e68a558 commit 1dbb4f0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

include/uapi/linux/acrn.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define _UAPI_ACRN_H
1313

1414
#include <linux/types.h>
15-
#include <linux/uuid.h>
1615

1716
#define ACRN_IO_REQUEST_MAX 16
1817

@@ -186,7 +185,7 @@ struct acrn_ioreq_notify {
186185
* @reserved0: Reserved and must be 0
187186
* @vcpu_num: Number of vCPU in the VM. Return from hypervisor.
188187
* @reserved1: Reserved and must be 0
189-
* @uuid: UUID of the VM. Pass to hypervisor directly.
188+
* @uuid: Empty space never to be used again (used to be UUID of the VM)
190189
* @vm_flag: Flag of the VM creating. Pass to hypervisor directly.
191190
* @ioreq_buf: Service VM GPA of I/O request buffer. Pass to
192191
* hypervisor directly.
@@ -198,7 +197,7 @@ struct acrn_vm_creation {
198197
__u16 reserved0;
199198
__u16 vcpu_num;
200199
__u16 reserved1;
201-
guid_t uuid;
200+
__u8 uuid[16];
202201
__u64 vm_flag;
203202
__u64 ioreq_buf;
204203
__u64 cpu_affinity;

samples/acrn/vm-sample.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ static struct acrn_io_request *io_req_buf = (struct acrn_io_request *)io_request
2929

3030
__u16 vcpu_num;
3131
__u16 vmid;
32-
/* POST_STANDARD_VM_UUID1, refer to https://github.com/projectacrn/acrn-hypervisor/blob/master/hypervisor/include/common/vm_uuids.h */
33-
guid_t vm_uuid = GUID_INIT(0x385479d2, 0xd625, 0xe811, 0x86, 0x4e, 0xcb, 0x7a, 0x18, 0xb3, 0x46, 0x43);
3432

3533
int hsm_fd;
3634
int is_running = 1;
@@ -63,7 +61,6 @@ int main(int argc, char **argv)
6361
}
6462
hsm_fd = open("/dev/acrn_hsm", O_RDWR|O_CLOEXEC);
6563

66-
memcpy(&create_vm.uuid, &vm_uuid, 16);
6764
create_vm.ioreq_buf = (__u64)io_req_buf;
6865
ret = ioctl(hsm_fd, ACRN_IOCTL_CREATE_VM, &create_vm);
6966
printf("Created VM! [%d]\n", ret);

0 commit comments

Comments
 (0)