diff mbox

[4/6] qemu-kvm: use upstream kvm_flush_coalesced_mmio_buffer

Message ID 20100323165347.307341883@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti March 23, 2010, 4:53 p.m. UTC
None
diff mbox

Patch

Index: qemu-kvm-cleanups/qemu-kvm.c
===================================================================
--- qemu-kvm-cleanups.orig/qemu-kvm.c
+++ qemu-kvm-cleanups/qemu-kvm.c
@@ -935,19 +935,7 @@  int kvm_run(CPUState *env)
 
     post_kvm_run(kvm, env);
 
-#if defined(KVM_CAP_COALESCED_MMIO)
-    if (kvm_state->coalesced_mmio) {
-        struct kvm_coalesced_mmio_ring *ring =
-            (void *) run + kvm_state->coalesced_mmio * PAGE_SIZE;
-        while (ring->first != ring->last) {
-            cpu_physical_memory_rw(ring->coalesced_mmio[ring->first].phys_addr,
-                           &ring->coalesced_mmio[ring->first].data[0],
-                           ring->coalesced_mmio[ring->first].len, 1);
-            smp_wmb();
-            ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX;
-        }
-    }
-#endif
+    kvm_flush_coalesced_mmio_buffer();
 
 #if !defined(__s390__)
     if (r == -1) {