aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorGuillaume Thouvenin <guillaume.thouvenin@ext.bull.net>2008-10-28 05:51:30 -0400
committerAvi Kivity <avi@redhat.com>2008-12-31 09:51:48 -0500
commite93f36bcfaa9e899c595e1c446c784a69021854a (patch)
tree25a506f2427ee4cd8f7197a7748fc90efd0bf7b8 /arch/x86/kvm/svm.c
parentc0d09828c870f90c6bc72070ada281568f89c63b (diff)
KVM: allow emulator to adjust rip for emulated pio instructions
If we call the emulator we shouldn't call skip_emulated_instruction() in the first place, since the emulator already computes the next rip for us. Thus we move ->skip_emulated_instruction() out of kvm_emulate_pio() and into handle_io() (and the svm equivalent). We also replaced "return 0" by "break" in the "do_io:" case because now the shadow register state needs to be committed. Otherwise eip will never be updated. Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 743aebd7bfcc..f0ad4d4217e4 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1115,6 +1115,7 @@ static int io_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
1115 rep = (io_info & SVM_IOIO_REP_MASK) != 0; 1115 rep = (io_info & SVM_IOIO_REP_MASK) != 0;
1116 down = (svm->vmcb->save.rflags & X86_EFLAGS_DF) != 0; 1116 down = (svm->vmcb->save.rflags & X86_EFLAGS_DF) != 0;
1117 1117
1118 skip_emulated_instruction(&svm->vcpu);
1118 return kvm_emulate_pio(&svm->vcpu, kvm_run, in, size, port); 1119 return kvm_emulate_pio(&svm->vcpu, kvm_run, in, size, port);
1119} 1120}
1120 1121