summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorWanpeng Li2017-07-14 03:30:39 +0200
committerRadim Krčmář2017-07-14 14:24:28 +0200
commitcfcd20e5caad6ba552978c16ed8bed7edb0143cf (patch)
tree0c16071fdf5bc12870cb7496ed13d8315bac8568 /arch/x86/kvm/svm.c
parentkvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 (diff)
downloadkernel-qcow2-linux-cfcd20e5caad6ba552978c16ed8bed7edb0143cf.tar.gz
kernel-qcow2-linux-cfcd20e5caad6ba552978c16ed8bed7edb0143cf.tar.xz
kernel-qcow2-linux-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/svm.c')
-rw-r--r--arch/x86/kvm/svm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 4c98d362e3e4..cde756a02b1a 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -637,11 +637,13 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
svm_set_interrupt_shadow(vcpu, 0);
}
-static void svm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
- bool has_error_code, u32 error_code,
- bool reinject)
+static void svm_queue_exception(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(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;
/*
* If we are within a nested VM we'd better #VMEXIT and let the guest