File kvm-qemu-madvise-DONTFORK-for-tight-memory-migration.patch of Package kvm

Index: qemu-kvm-0.15.0/exec.c
===================================================================
--- qemu-kvm-0.15.0.orig/exec.c
+++ qemu-kvm-0.15.0/exec.c
@@ -2941,6 +2941,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic
             if (!new_block->host) {
                 new_block->host = qemu_vmalloc(size);
                 qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE);
+                qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK);
             }
 #else
             fprintf(stderr, "-mem-path option unsupported\n");
@@ -2968,6 +2969,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic
             }
 #endif
             qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE);
+            qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK);
         }
     }
     new_block->length = size;