summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2017-04-27 07:15:36 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2017-04-27 07:15:36 +0000
commit78de322ca314d54368b8a6ae60b613ea47805edf (patch)
tree1298dfb386c23452771dea068f115f927580b09b /sys/arch/amd64
parent124cd75683cea7180a46754c7986a1e8a239bc99 (diff)
rename a struct that was denoted as "VMX only" to make it more clear
that it can be used in SVM and VMX. no functional change
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/include/vmmvar.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/amd64/include/vmmvar.h b/sys/arch/amd64/include/vmmvar.h
index 30b42a97086..fcc0224171a 100644
--- a/sys/arch/amd64/include/vmmvar.h
+++ b/sys/arch/amd64/include/vmmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmmvar.h,v 1.33 2017/04/27 06:16:39 mlarkin Exp $ */
+/* $OpenBSD: vmmvar.h,v 1.34 2017/04/27 07:15:35 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -613,10 +613,10 @@ struct vmx_msr_store
* Storage for guest registers not preserved in VMCS and various exit
* information.
*
- * Note that vmx_enter_guest depends on the layout of this struct for
+ * Note that vmx/svm_enter_guest depend on the layout of this struct for
* field access.
*/
-struct vmx_gueststate
+struct vcpu_gueststate
{
/* %rsi should be first */
uint64_t vg_rsi; /* 0x00 */
@@ -685,6 +685,8 @@ struct vcpu {
uint64_t vc_h_xcr0;
+ struct vcpu_gueststate vc_gueststate;
+
/* VMX only */
uint64_t vc_vmx_basic;
uint64_t vc_vmx_entry_ctls;
@@ -696,7 +698,6 @@ struct vcpu {
uint64_t vc_vmx_procbased_ctls;
uint64_t vc_vmx_true_procbased_ctls;
uint64_t vc_vmx_procbased2_ctls;
- struct vmx_gueststate vc_gueststate;
vaddr_t vc_vmx_msr_exit_save_va;
paddr_t vc_vmx_msr_exit_save_pa;
vaddr_t vc_vmx_msr_exit_load_va;
@@ -723,8 +724,8 @@ int vmwrite(uint64_t, uint64_t);
int vmread(uint64_t, uint64_t *);
void invvpid(uint64_t, struct vmx_invvpid_descriptor *);
void invept(uint64_t, struct vmx_invept_descriptor *);
-int vmx_enter_guest(uint64_t *, struct vmx_gueststate *, int);
-int svm_enter_guest(uint64_t, struct vmx_gueststate *,
+int vmx_enter_guest(uint64_t *, struct vcpu_gueststate *, int);
+int svm_enter_guest(uint64_t, struct vcpu_gueststate *,
struct region_descriptor *);
void start_vmm_on_cpu(struct cpu_info *);
void stop_vmm_on_cpu(struct cpu_info *);