qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 8/8] kvm: Switch to unlocked MMIO


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 8/8] kvm: Switch to unlocked MMIO
Date: Wed, 18 Mar 2015 14:21:49 +0100

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]