summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2014-08-17 01:00:42 +0000
committergrehan <grehan@FreeBSD.org>2014-08-17 01:00:42 +0000
commit7a365d2c053ebcca4ab5c48af1d3e404e5db0159 (patch)
treed0a923d882ace027d5d1341c58694ac5860fc7ff /sys/amd64/include
parente83027edbbda961289c2ed185571fb6272b4f756 (diff)
downloadFreeBSD-src-7a365d2c053ebcca4ab5c48af1d3e404e5db0159.zip
FreeBSD-src-7a365d2c053ebcca4ab5c48af1d3e404e5db0159.tar.gz
MFC r267216
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained by vmm.ko. This allows the virtual machine to be restarted without having to destroy it first.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/vmm.h1
-rw-r--r--sys/amd64/include/vmm_dev.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
index 05df325..00e1d96 100644
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -105,6 +105,7 @@ extern struct vmm_ops vmm_ops_amd;
int vm_create(const char *name, struct vm **retvm);
void vm_destroy(struct vm *vm);
+int vm_reinit(struct vm *vm);
const char *vm_name(struct vm *vm);
int vm_malloc(struct vm *vm, vm_paddr_t gpa, size_t len);
int vm_map_mmio(struct vm *vm, vm_paddr_t gpa, size_t len, vm_paddr_t hpa);
diff --git a/sys/amd64/include/vmm_dev.h b/sys/amd64/include/vmm_dev.h
index a6568dc..9b3b00d 100644
--- a/sys/amd64/include/vmm_dev.h
+++ b/sys/amd64/include/vmm_dev.h
@@ -196,6 +196,7 @@ enum {
IOCNUM_SET_CAPABILITY = 2,
IOCNUM_GET_CAPABILITY = 3,
IOCNUM_SUSPEND = 4,
+ IOCNUM_REINIT = 5,
/* memory apis */
IOCNUM_MAP_MEMORY = 10,
@@ -251,6 +252,8 @@ enum {
_IOWR('v', IOCNUM_RUN, struct vm_run)
#define VM_SUSPEND \
_IOW('v', IOCNUM_SUSPEND, struct vm_suspend)
+#define VM_REINIT \
+ _IO('v', IOCNUM_REINIT)
#define VM_MAP_MEMORY \
_IOWR('v', IOCNUM_MAP_MEMORY, struct vm_memory_segment)
#define VM_GET_MEMORY_SEG \
OpenPOWER on IntegriCloud