diff options
author | Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> | 2008-10-28 05:51:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:51:48 -0500 |
commit | e93f36bcfaa9e899c595e1c446c784a69021854a (patch) | |
tree | 25a506f2427ee4cd8f7197a7748fc90efd0bf7b8 /arch/x86/kvm/x86.c | |
parent | c0d09828c870f90c6bc72070ada281568f89c63b (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/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ceeac8897143..38f79b6aaf1e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2478,8 +2478,6 @@ int kvm_emulate_pio(struct kvm_vcpu *vcpu, struct kvm_run *run, int in, | |||
2478 | val = kvm_register_read(vcpu, VCPU_REGS_RAX); | 2478 | val = kvm_register_read(vcpu, VCPU_REGS_RAX); |
2479 | memcpy(vcpu->arch.pio_data, &val, 4); | 2479 | memcpy(vcpu->arch.pio_data, &val, 4); |
2480 | 2480 | ||
2481 | kvm_x86_ops->skip_emulated_instruction(vcpu); | ||
2482 | |||
2483 | pio_dev = vcpu_find_pio_dev(vcpu, port, size, !in); | 2481 | pio_dev = vcpu_find_pio_dev(vcpu, port, size, !in); |
2484 | if (pio_dev) { | 2482 | if (pio_dev) { |
2485 | kernel_pio(pio_dev, vcpu, vcpu->arch.pio_data); | 2483 | kernel_pio(pio_dev, vcpu, vcpu->arch.pio_data); |