From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 8/8] kvm: Switch to unlocked MMIO
Date: Wed, 18 Mar 2015 14:21:49 +0100 [thread overview]
Message-ID: <1426684909-95030-9-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1426684909-95030-1-git-send-email-pbonzini@redhat.com>
Do not take the BQL before dispatching MMIO requests of KVM VCPUs.
Instead, call the unlocked version of address_space_rw. This enables
completely BQL-free MMIO handling in KVM mode for upcoming devices with
fine-grained locking.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
kvm-all.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 2848e5b..fa0cfed 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1813,12 +1813,11 @@ int kvm_cpu_exec(CPUState *cpu)
break;
case KVM_EXIT_MMIO:
DPRINTF("handle_mmio\n");
- qemu_mutex_lock_iothread();
- cpu_physical_memory_rw(run->mmio.phys_addr,
- run->mmio.data,
- run->mmio.len,
- run->mmio.is_write);
- qemu_mutex_unlock_iothread();
+ address_space_rw_unlocked(&address_space_memory,
+ run->mmio.phys_addr,
+ run->mmio.data,
+ run->mmio.len,
+ run->mmio.is_write);
ret = 0;
break;
case KVM_EXIT_IRQ_WINDOW_OPEN:
--
2.3.0
next prev parent reply other threads:[~2015-03-18 13:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 13:21 [Qemu-devel] [PATCH for-2.4 0/8] memory: enable unlocked PIO/MMIO in KVM Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 1/8] memory: Add global-locking property to memory regions Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 2/8] exec: move rcu_read_lock/unlock to address_space_translate callers Paolo Bonzini
2015-03-19 13:27 ` Jan Kiszka
2015-03-19 14:55 ` Jan Kiszka
2015-03-19 16:23 ` Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 3/8] memory: Provide address_space_rw_unlocked Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 4/8] kvm: First step to push iothread lock out of inner run loop Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 5/8] kvm: Switch to unlocked PIO Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 6/8] exec: mark unassigned_io_ops as unlocked Paolo Bonzini
2015-03-18 14:33 ` Jan Kiszka
2015-03-18 14:53 ` Paolo Bonzini
2015-03-18 13:21 ` [Qemu-devel] [PATCH 7/8] acpi: mark PMTIMER " Paolo Bonzini
2015-03-18 13:21 ` Paolo Bonzini [this message]
2015-03-18 14:33 ` [Qemu-devel] [PATCH for-2.4 0/8] memory: enable unlocked PIO/MMIO in KVM Jan Kiszka
2015-03-18 14:52 ` Paolo Bonzini
2015-03-18 15:04 ` Jan Kiszka
2015-03-19 8:52 ` Paolo Bonzini
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=1426684909-95030-9-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).