summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include/vmmvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64/include/vmmvar.h')
-rw-r--r--sys/arch/amd64/include/vmmvar.h33
1 files changed, 6 insertions, 27 deletions
diff --git a/sys/arch/amd64/include/vmmvar.h b/sys/arch/amd64/include/vmmvar.h
index 576115dfb3f..cd43de30611 100644
--- a/sys/arch/amd64/include/vmmvar.h
+++ b/sys/arch/amd64/include/vmmvar.h
@@ -1,3 +1,4 @@
+/* $OpenBSD: vmmvar.h,v 1.2 2015/11/16 10:08:41 mpi Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -20,8 +21,6 @@
#ifndef _MACHINE_VMMVAR_H_
#define _MACHINE_VMMVAR_H_
-#include <sys/rwlock.h>
-
#define VMM_HV_SIGNATURE "OpenBSDVMM58"
#define VMM_MAX_DISKS_PER_VM 2
@@ -216,18 +215,10 @@ struct vm_readpage_params {
#ifdef _KERNEL
-#include <uvm/uvm_extern.h>
-
#define VMX_FAIL_LAUNCH_UNKNOWN 1
#define VMX_FAIL_LAUNCH_INVALID_VMCS 2
#define VMX_FAIL_LAUNCH_VALID_VMCS 3
-#ifdef VMM_DEBUG
-#define dprintf(x...) do { if (vmm_debug) printf(x); } while(0)
-#else
-#define dprintf(x...)
-#endif /* VMM_DEBUG */
-
enum {
VMM_MODE_UNKNOWN,
VMM_MODE_VMX,
@@ -303,6 +294,11 @@ struct vmx_gueststate
};
/*
+ * Virtual Machine
+ */
+struct vm;
+
+/*
* Virtual CPU
*/
struct vcpu {
@@ -351,23 +347,6 @@ struct vcpu {
SLIST_HEAD(vcpu_head, vcpu);
-/*
- * Virtual Machine
- */
-struct vm {
- vm_map_t vm_map;
- uint32_t vm_id;
- pid_t vm_creator_pid;
- uint32_t vm_memory_size;
- char vm_name[VMM_MAX_NAME_LEN];
-
- struct vcpu_head vm_vcpu_list;
- uint32_t vm_vcpu_ct;
- struct rwlock vm_vcpu_lock;
-
- SLIST_ENTRY(vm) vm_link;
-};
-
void vmm_dispatch_intr(vaddr_t);
int vmxon(uint64_t *);
int vmxoff(void);