-/* $OpenBSD: vmm.c,v 1.67 2016/07/16 06:32:18 mlarkin Exp $ */
+/* $OpenBSD: vmm.c,v 1.68 2016/07/16 18:36:41 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
void vm_impl_deinit_svm(struct vm *);
void vm_teardown(struct vm *);
int vcpu_vmx_check_cap(struct vcpu *, uint32_t, uint32_t, int);
-int vcpu_vmx_compute_ctrl(struct vcpu *, uint64_t, uint16_t, uint32_t,
- uint32_t, uint32_t *);
+int vcpu_vmx_compute_ctrl(uint64_t, uint16_t, uint32_t, uint32_t, uint32_t *);
int vmx_get_exit_info(uint64_t *, uint64_t *);
int vmx_handle_exit(struct vcpu *);
int vmx_handle_cpuid(struct vcpu *);
ctrlval = vcpu->vc_vmx_pinbased_ctls;
}
- if (vcpu_vmx_compute_ctrl(vcpu, ctrlval, ctrl, want1, want0,
- &pinbased)) {
+ if (vcpu_vmx_compute_ctrl(ctrlval, ctrl, want1, want0, &pinbased)) {
ret = EINVAL;
goto exit;
}
ctrlval = vcpu->vc_vmx_procbased_ctls;
}
- if (vcpu_vmx_compute_ctrl(vcpu, ctrlval, ctrl, want1, want0,
- &procbased)) {
+ if (vcpu_vmx_compute_ctrl(ctrlval, ctrl, want1, want0, &procbased)) {
ret = EINVAL;
goto exit;
}
ctrlval = vcpu->vc_vmx_procbased2_ctls;
ctrl = IA32_VMX_PROCBASED2_CTLS;
- if (vcpu_vmx_compute_ctrl(vcpu, ctrlval, ctrl, want1, want0,
- &procbased2)) {
+ if (vcpu_vmx_compute_ctrl(ctrlval, ctrl, want1, want0, &procbased2)) {
ret = EINVAL;
goto exit;
}
ctrlval = vcpu->vc_vmx_exit_ctls;
}
- if (vcpu_vmx_compute_ctrl(vcpu, ctrlval, ctrl, want1, want0, &exit)) {
+ if (vcpu_vmx_compute_ctrl(ctrlval, ctrl, want1, want0, &exit)) {
ret = EINVAL;
goto exit;
}
ctrlval = vcpu->vc_vmx_entry_ctls;
}
- if (vcpu_vmx_compute_ctrl(vcpu, ctrlval, ctrl, want1, want0, &entry)) {
+ if (vcpu_vmx_compute_ctrl(ctrlval, ctrl, want1, want0, &entry)) {
ret = EINVAL;
goto exit;
}
* are present on the CPU we're on.
*
* Parameters:
- * vcpu: the vcpu for which controls are to be computed. (XXX now unused)
* ctrlval: the control value, as read from the CPU MSR
* ctrl: which control is being set (eg, pinbased, procbased, etc)
* want0: the set of desired 0 bits
* an unworkable control setup.
*/
int
-vcpu_vmx_compute_ctrl(struct vcpu *vcpu, uint64_t ctrlval, uint16_t ctrl,
- uint32_t want1, uint32_t want0, uint32_t *out)
+vcpu_vmx_compute_ctrl(uint64_t ctrlval, uint16_t ctrl, uint32_t want1,
+ uint32_t want0, uint32_t *out)
{
int i, set, clear;