diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2023-04-25 12:46:14 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2023-04-25 12:46:14 +0000 |
commit | dfaf58e2837030abaf552d5534faad6f4399ce1c (patch) | |
tree | a6480222f6fe7514e9d0b38db0b7fb14fbf3b4b5 /usr.sbin/vmd/vmd.h | |
parent | eba21f3d8d841dbd7d6a710260d947da9c161550 (diff) |
vmm(4)/vmd(8): pull struct members out of vmm ioctl create struct.
The object sent to vmm(4) contained file paths and details the
kernel does not need for cpu virtualization as device emulation is
in userland. Effectively, "pull up" the struct members from the
vm_create_params struct to the parent vmop_create_params struct.
This allows us to clean up some of vmd(8) and simplify things for
switching to having vmctl(8) open the "kernel" file (SeaBIOS, bsd.rd,
etc.) to allow users to boot recovery ramdisk kernels.
ok mlarkin@
Diffstat (limited to 'usr.sbin/vmd/vmd.h')
-rw-r--r-- | usr.sbin/vmd/vmd.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/vmd/vmd.h b/usr.sbin/vmd/vmd.h index 5e0eb8dfe8e..00becd961c4 100644 --- a/usr.sbin/vmd/vmd.h +++ b/usr.sbin/vmd/vmd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.h,v 1.117 2023/04/23 12:11:37 dv Exp $ */ +/* $OpenBSD: vmd.h,v 1.118 2023/04/25 12:46:13 dv Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -55,9 +55,6 @@ #define VM_MAX_BASE_PER_DISK 4 #define VM_TTYNAME_MAX 16 #define VM_MAX_DISKS_PER_VM 4 -#define VM_MAX_PATH_DISK 128 -#define VM_MAX_PATH_CDROM 128 -#define VM_MAX_KERNEL_PATH 128 #define VM_MAX_NICS_PER_VM 4 #define VM_PCI_MMIO_BAR_SIZE 0x00010000 @@ -216,15 +213,23 @@ struct vmop_create_params { #define VMIFF_RDOMAIN 0x08 #define VMIFF_OPTMASK (VMIFF_LOCKED|VMIFF_LOCAL|VMIFF_RDOMAIN) + size_t vmc_ndisks; + char vmc_disks[VM_MAX_DISKS_PER_VM][PATH_MAX]; unsigned int vmc_disktypes[VM_MAX_DISKS_PER_VM]; unsigned int vmc_diskbases[VM_MAX_DISKS_PER_VM]; #define VMDF_RAW 0x01 #define VMDF_QCOW2 0x02 + char vmc_cdrom[PATH_MAX]; + char vmc_kernel[PATH_MAX]; + + size_t vmc_nnics; char vmc_ifnames[VM_MAX_NICS_PER_VM][IF_NAMESIZE]; char vmc_ifswitch[VM_MAX_NICS_PER_VM][VM_NAME_MAX]; char vmc_ifgroup[VM_MAX_NICS_PER_VM][IF_NAMESIZE]; unsigned int vmc_ifrdomain[VM_MAX_NICS_PER_VM]; + uint8_t vmc_macs[VM_MAX_NICS_PER_VM][6]; + struct vmop_owner vmc_owner; /* instance template params */ |