summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@hotmail.com>2017-07-13 18:30:39 -0700
committerRadim Krčmář <rkrcmar@redhat.com>2017-07-14 14:24:28 +0200
commitcfcd20e5caad6ba552978c16ed8bed7edb0143cf (patch)
tree0c16071fdf5bc12870cb7496ed13d8315bac8568 /arch/x86/kvm/vmx.c
parentefc479e6900c22bad9a2b649d13405ed9cde2d53 (diff)
downloadlwn-cfcd20e5caad6ba552978c16ed8bed7edb0143cf.tar.gz
lwn-cfcd20e5caad6ba552978c16ed8bed7edb0143cf.zip
KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list
This patch removes all arguments except the first in kvm_x86_ops->queue_exception since they can extract the arguments from vcpu->arch.exception themselves. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 25f2fdccf625..69cc228436ea 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2435,11 +2435,13 @@ static int nested_vmx_check_exception(struct kvm_vcpu *vcpu, unsigned nr)
return 1;
}
-static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
- bool has_error_code, u32 error_code,
- bool reinject)
+static void vmx_queue_exception(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
+ unsigned nr = vcpu->arch.exception.nr;
+ bool has_error_code = vcpu->arch.exception.has_error_code;
+ bool reinject = vcpu->arch.exception.reinject;
+ u32 error_code = vcpu->arch.exception.error_code;
u32 intr_info = nr | INTR_INFO_VALID_MASK;
if (!reinject && is_guest_mode(vcpu) &&