[RFC,3/5] vhost: skip memory which needs dirty logging

Submitted by Michael S. Tsirkin on April 6, 2011, 8:41 p.m.

Details

Message ID f5a4e64f8e12d088a11b9a2743875cc88671e13a.1302121974.git.mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin April 6, 2011, 8:41 p.m.
vhost doesn't support write logging
(except for migration), anyway.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/vhost.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/hw/vhost.c b/hw/vhost.c
index dc3d0e2..257e3dd 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -311,6 +311,10 @@  static void vhost_client_set_memory(CPUPhysMemoryClient *client,
     int r;
     dev->mem = qemu_realloc(dev->mem, s);
 
+    if (log_dirty) {
+        flags = IO_MEM_UNASSIGNED;
+    }
+
     assert(size);
 
     vhost_dev_unassign_memory(dev, start_addr, size);