aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-08-27 09:41:43 -0400
committerGleb Natapov <gleb@redhat.com>2013-08-28 10:15:54 -0400
commit0912c9771e9902f752e890e93af495cc06a786ac (patch)
tree7a2804354137a5dc7de8bd2721877d89da271820
parent94452b9e3401691c4d34a5a6f6a3a5b4e9c50a48 (diff)
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: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cb276e976203..e514b3cb8b93 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5122,9 +5122,10 @@ restart:
5122 inject_emulated_exception(vcpu); 5122 inject_emulated_exception(vcpu);
5123 r = EMULATE_DONE; 5123 r = EMULATE_DONE;
5124 } else if (vcpu->arch.pio.count) { 5124 } else if (vcpu->arch.pio.count) {
5125 if (!vcpu->arch.pio.in) 5125 if (!vcpu->arch.pio.in) {
5126 /* FIXME: return into emulator if single-stepping. */
5126 vcpu->arch.pio.count = 0; 5127 vcpu->arch.pio.count = 0;
5127 else { 5128 } else {
5128 writeback = false; 5129 writeback = false;
5129 vcpu->arch.complete_userspace_io = complete_emulated_pio; 5130 vcpu->arch.complete_userspace_io = complete_emulated_pio;
5130 } 5131 }
@@ -6176,6 +6177,8 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu)
6176 6177
6177 if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) { 6178 if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) {
6178 vcpu->mmio_needed = 0; 6179 vcpu->mmio_needed = 0;
6180
6181 /* FIXME: return into emulator if single-stepping. */
6179 if (vcpu->mmio_is_write) 6182 if (vcpu->mmio_is_write)
6180 return 1; 6183 return 1;
6181 vcpu->mmio_read_completed = 1; 6184 vcpu->mmio_read_completed = 1;