Commit 0912c977 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Gleb Natapov

KVM: x86: add comments where MMIO does not return to the emulator

Support for single-step in the emulator (new in 3.12) does not work for
MMIO or PIO writes, because they are completed without returning to
the emulator.  This is not worse than what we had in 3.11; still, add
comments so that the issue is not forgotten.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
parent 94452b9e
...@@ -5122,9 +5122,10 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, ...@@ -5122,9 +5122,10 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
inject_emulated_exception(vcpu); inject_emulated_exception(vcpu);
r = EMULATE_DONE; r = EMULATE_DONE;
} else if (vcpu->arch.pio.count) { } else if (vcpu->arch.pio.count) {
if (!vcpu->arch.pio.in) if (!vcpu->arch.pio.in) {
/* FIXME: return into emulator if single-stepping. */
vcpu->arch.pio.count = 0; vcpu->arch.pio.count = 0;
else { } else {
writeback = false; writeback = false;
vcpu->arch.complete_userspace_io = complete_emulated_pio; vcpu->arch.complete_userspace_io = complete_emulated_pio;
} }
...@@ -6176,6 +6177,8 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu) ...@@ -6176,6 +6177,8 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu)
if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) { if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) {
vcpu->mmio_needed = 0; vcpu->mmio_needed = 0;
/* FIXME: return into emulator if single-stepping. */
if (vcpu->mmio_is_write) if (vcpu->mmio_is_write)
return 1; return 1;
vcpu->mmio_read_completed = 1; vcpu->mmio_read_completed = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment