From 8b888ed1ba3bbb6f85f04a3c6dcdbbd69ac68e65 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Sat, 16 Jul 2016 18:36:41 +0000 Subject: [PATCH] remove an unused parameter that wasn't handled during a previous refactor (reducing the number of XXXs in vmm) --- sys/arch/amd64/amd64/vmm.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index 6c0e8c52658..4e2cad6e503 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $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 * @@ -132,8 +132,7 @@ void vm_impl_deinit_vmx(struct vm *); 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 *); @@ -1179,8 +1178,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_init_state *vis) 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; } @@ -1229,8 +1227,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_init_state *vis) 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; } @@ -1279,8 +1276,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_init_state *vis) 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; } @@ -1310,7 +1306,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_init_state *vis) 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; } @@ -1345,7 +1341,7 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_init_state *vis) 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; } @@ -2219,7 +2215,6 @@ vcpu_vmx_check_cap(struct vcpu *vcpu, uint32_t msr, uint32_t cap, int set) * 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 @@ -2231,8 +2226,8 @@ vcpu_vmx_check_cap(struct vcpu *vcpu, uint32_t msr, uint32_t cap, int set) * 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; -- 2.20.1