Changeset View
Changeset View
Standalone View
Standalone View
lib/libvmmapi/internal.h
/*- | /*- | ||||
* SPDX-License-Identifier: BSD-2-Clause | * SPDX-License-Identifier: BSD-2-Clause | ||||
* | * | ||||
* Copyright (c) 2022 John Baldwin <jhb@FreeBSD.org> | * Copyright (c) 2022 John Baldwin <jhb@FreeBSD.org> | ||||
*/ | */ | ||||
#ifndef __VMMAPI_INTERNAL_H__ | #ifndef __VMMAPI_INTERNAL_H__ | ||||
#define __VMMAPI_INTERNAL_H__ | #define __VMMAPI_INTERNAL_H__ | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
enum { | |||||
VM_MEMSEG_LOW, | |||||
VM_MEMSEG_HIGH, | |||||
VM_MEMSEG_COUNT, | |||||
}; | |||||
struct vmctx { | struct vmctx { | ||||
int fd; | int fd; | ||||
struct { | vm_size_t lowmem_size; | ||||
vm_paddr_t base; | vm_size_t highmem_size; | ||||
vm_size_t size; | |||||
} memsegs[VM_MEMSEG_COUNT]; | |||||
int memflags; | int memflags; | ||||
char *baseaddr; | char *baseaddr; | ||||
char *name; | char *name; | ||||
cpuset_t cpu_affinity[VM_MAXSYSMEM]; | |||||
}; | }; | ||||
struct vcpu { | struct vcpu { | ||||
struct vmctx *ctx; | struct vmctx *ctx; | ||||
int vcpuid; | int vcpuid; | ||||
}; | }; | ||||
int vcpu_ioctl(struct vcpu *vcpu, u_long cmd, void *arg); | int vcpu_ioctl(struct vcpu *vcpu, u_long cmd, void *arg); | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |