diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2009-02-08 07:28:15 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-03-24 05:03:08 -0400 |
commit | 34c33d163fe509da8414a736c6328855f8c164e5 (patch) | |
tree | 673921f5ce66b19e6e0eecf12e9ec94c69acf8e1 /arch/x86 | |
parent | 1b2fd70c4eddef53f32639296818c0253e7ca48d (diff) |
KVM: Drop unused evaluations from string pio handlers
Looks like neither the direction nor the rep prefix are used anymore.
Drop related evaluations from SVM's and VMX's I/O exit handlers.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1c4a018bf4bb..22e88a4a51c7 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1194,7 +1194,7 @@ static int shutdown_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | |||
1194 | static int io_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | 1194 | static int io_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) |
1195 | { | 1195 | { |
1196 | u32 io_info = svm->vmcb->control.exit_info_1; /* address size bug? */ | 1196 | u32 io_info = svm->vmcb->control.exit_info_1; /* address size bug? */ |
1197 | int size, down, in, string, rep; | 1197 | int size, in, string; |
1198 | unsigned port; | 1198 | unsigned port; |
1199 | 1199 | ||
1200 | ++svm->vcpu.stat.io_exits; | 1200 | ++svm->vcpu.stat.io_exits; |
@@ -1213,8 +1213,6 @@ static int io_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) | |||
1213 | in = (io_info & SVM_IOIO_TYPE_MASK) != 0; | 1213 | in = (io_info & SVM_IOIO_TYPE_MASK) != 0; |
1214 | port = io_info >> 16; | 1214 | port = io_info >> 16; |
1215 | size = (io_info & SVM_IOIO_SIZE_MASK) >> SVM_IOIO_SIZE_SHIFT; | 1215 | size = (io_info & SVM_IOIO_SIZE_MASK) >> SVM_IOIO_SIZE_SHIFT; |
1216 | rep = (io_info & SVM_IOIO_REP_MASK) != 0; | ||
1217 | down = (svm->vmcb->save.rflags & X86_EFLAGS_DF) != 0; | ||
1218 | 1216 | ||
1219 | skip_emulated_instruction(&svm->vcpu); | 1217 | skip_emulated_instruction(&svm->vcpu); |
1220 | return kvm_emulate_pio(&svm->vcpu, kvm_run, in, size, port); | 1218 | return kvm_emulate_pio(&svm->vcpu, kvm_run, in, size, port); |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index df454de8acfa..509b35305402 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2698,7 +2698,7 @@ static int handle_triple_fault(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2698 | static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | 2698 | static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) |
2699 | { | 2699 | { |
2700 | unsigned long exit_qualification; | 2700 | unsigned long exit_qualification; |
2701 | int size, down, in, string, rep; | 2701 | int size, in, string; |
2702 | unsigned port; | 2702 | unsigned port; |
2703 | 2703 | ||
2704 | ++vcpu->stat.io_exits; | 2704 | ++vcpu->stat.io_exits; |
@@ -2714,8 +2714,6 @@ static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2714 | 2714 | ||
2715 | size = (exit_qualification & 7) + 1; | 2715 | size = (exit_qualification & 7) + 1; |
2716 | in = (exit_qualification & 8) != 0; | 2716 | in = (exit_qualification & 8) != 0; |
2717 | down = (vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_DF) != 0; | ||
2718 | rep = (exit_qualification & 32) != 0; | ||
2719 | port = exit_qualification >> 16; | 2717 | port = exit_qualification >> 16; |
2720 | 2718 | ||
2721 | skip_emulated_instruction(vcpu); | 2719 | skip_emulated_instruction(vcpu); |