From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org, gnatapov@redhat.com
Subject: [PATCH 3/3] KVM: x86: add comments where MMIO does not return to the emulator
Date: Tue, 27 Aug 2013 15:41:43 +0200 [thread overview]
Message-ID: <1377610903-12356-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1377610903-12356-1-git-send-email-pbonzini@redhat.com>
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>
---
arch/x86/kvm/x86.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 668f19a..3625798 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5122,9 +5122,10 @@ restart:
inject_emulated_exception(vcpu);
r = EMULATE_DONE;
} 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;
- else {
+ } else {
writeback = false;
vcpu->arch.complete_userspace_io = complete_emulated_pio;
}
@@ -6154,6 +6155,8 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu)
if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) {
vcpu->mmio_needed = 0;
+
+ /* FIXME: return into emulator if single-stepping. */
if (vcpu->mmio_is_write)
return 1;
vcpu->mmio_read_completed = 1;
--
1.8.3.1
next prev parent reply other threads:[~2013-08-27 13:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 13:41 [PATCH 0/3] Trivial KVM patches for 3.12 Paolo Bonzini
2013-08-27 13:41 ` [PATCH 1/3] KVM: rename __kvm_io_bus_sort_cmp to kvm_io_bus_cmp Paolo Bonzini
2013-08-27 13:41 ` [PATCH 2/3] KVM: vmx: count exits to userspace during invalid guest emulation Paolo Bonzini
2013-08-27 13:41 ` Paolo Bonzini [this message]
2013-08-28 6:40 ` [PATCH 0/3] Trivial KVM patches for 3.12 Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377610903-12356-4-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=gnatapov@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®