Changeset View
Changeset View
Standalone View
Standalone View
lib/libvmmapi/vmmapi.h
Show All 25 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _VMMAPI_H_ | #ifndef _VMMAPI_H_ | ||||
#define _VMMAPI_H_ | #define _VMMAPI_H_ | ||||
#include <sys/cdefs.h> | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/cpuset.h> | #include <sys/cpuset.h> | ||||
#include <machine/vmm.h> | #include <machine/vmm.h> | ||||
markj: Conventionally, cdefs.h is included first (see style(9)). So:
```
#include <sys/cdefs.h>… | |||||
#include <machine/vmm_dev.h> | #include <machine/vmm_dev.h> | ||||
#include <stdbool.h> | #include <stdbool.h> | ||||
/* | /* | ||||
* API version for out-of-tree consumers like grub-bhyve for making compile | * API version for out-of-tree consumers like grub-bhyve for making compile | ||||
* time decisions. | * time decisions. | ||||
*/ | */ | ||||
Show All 27 Lines | |||||
*/ | */ | ||||
enum { | enum { | ||||
VM_SYSMEM, | VM_SYSMEM, | ||||
VM_BOOTROM, | VM_BOOTROM, | ||||
VM_FRAMEBUFFER, | VM_FRAMEBUFFER, | ||||
VM_PCIROM, | VM_PCIROM, | ||||
}; | }; | ||||
__BEGIN_DECLS | |||||
/* | /* | ||||
* Get the length and name of the memory segment identified by 'segid'. | * Get the length and name of the memory segment identified by 'segid'. | ||||
* Note that system memory segments are identified with a nul name. | * Note that system memory segments are identified with a nul name. | ||||
* | * | ||||
* Returns 0 on success and non-zero otherwise. | * Returns 0 on success and non-zero otherwise. | ||||
*/ | */ | ||||
int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, | int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, | ||||
size_t namesiz); | size_t namesiz); | ||||
▲ Show 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | int vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu, | ||||
uint32_t esp); | uint32_t esp); | ||||
void vm_setup_freebsd_gdt(uint64_t *gdtr); | void vm_setup_freebsd_gdt(uint64_t *gdtr); | ||||
/* | /* | ||||
* Save and restore | * Save and restore | ||||
*/ | */ | ||||
int vm_snapshot_req(struct vm_snapshot_meta *meta); | int vm_snapshot_req(struct vm_snapshot_meta *meta); | ||||
int vm_restore_time(struct vmctx *ctx); | int vm_restore_time(struct vmctx *ctx); | ||||
__END_DECLS | |||||
#endif /* _VMMAPI_H_ */ | #endif /* _VMMAPI_H_ */ |
Conventionally, cdefs.h is included first (see style(9)). So: