aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@amd.com>2010-12-21 05:12:02 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:31:00 -0500
commit51d8b66199e94284e7725a79eae4a38de4b80d54 (patch)
tree904e8c206d9d1d52eb673c235c08b7a612cce9b0 /arch/x86/kvm/x86.c
parentdb8fcefaa704ccb40b6dcd24e3b75bad3ce7dde3 (diff)
KVM: cleanup emulate_instruction
emulate_instruction had many callers, but only one used all parameters. One parameter was unused, another one is now hidden by a wrapper function (required for a future addition anyway), so most callers use now a shorter parameter list. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1d54cb7f3358..a6fcb76196b7 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4363,10 +4363,9 @@ static bool reexecute_instruction(struct kvm_vcpu *vcpu, gva_t gva)
4363 return false; 4363 return false;
4364} 4364}
4365 4365
4366int emulate_instruction(struct kvm_vcpu *vcpu, 4366int x86_emulate_instruction(struct kvm_vcpu *vcpu,
4367 unsigned long cr2, 4367 unsigned long cr2,
4368 u16 error_code, 4368 int emulation_type)
4369 int emulation_type)
4370{ 4369{
4371 int r; 4370 int r;
4372 struct decode_cache *c = &vcpu->arch.emulate_ctxt.decode; 4371 struct decode_cache *c = &vcpu->arch.emulate_ctxt.decode;
@@ -4474,7 +4473,7 @@ done:
4474 4473
4475 return r; 4474 return r;
4476} 4475}
4477EXPORT_SYMBOL_GPL(emulate_instruction); 4476EXPORT_SYMBOL_GPL(x86_emulate_instruction);
4478 4477
4479int kvm_fast_pio_out(struct kvm_vcpu *vcpu, int size, unsigned short port) 4478int kvm_fast_pio_out(struct kvm_vcpu *vcpu, int size, unsigned short port)
4480{ 4479{
@@ -5398,7 +5397,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
5398 vcpu->mmio_needed = 0; 5397 vcpu->mmio_needed = 0;
5399 } 5398 }
5400 vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); 5399 vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
5401 r = emulate_instruction(vcpu, 0, 0, EMULTYPE_NO_DECODE); 5400 r = emulate_instruction(vcpu, EMULTYPE_NO_DECODE);
5402 srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); 5401 srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
5403 if (r != EMULATE_DONE) { 5402 if (r != EMULATE_DONE) {
5404 r = 0; 5403 r = 0;