this patch just remove the memset from kvmctl, so the vm will load much
faster now
>From dc0164113041c2f2bf22fc066ca99b9b8531d627 Mon Sep 17 00:00:00 2001
From: Izik Eidus <[EMAIL PROTECTED](none)>
Date: Sat, 13 Oct 2007 02:56:25 +0200
Subject: [PATCH] now that gfn_to_page get called at run time, we dont have to do memset on the memory.
(it is now much faster to load VM with alot of memory)
Signed-off-by: Izik Eidus <[EMAIL PROTECTED]>
---
user/kvmctl.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/user/kvmctl.c b/user/kvmctl.c
index 0604f2f..ff2014e 100644
--- a/user/kvmctl.c
+++ b/user/kvmctl.c
@@ -391,7 +391,6 @@ int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory,
low_memory.userspace_addr = (unsigned long)*vm_mem;
- memset((unsigned long *)low_memory.userspace_addr, 0, low_memory.memory_size);
/* 640K should be enough. */
r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &low_memory);
if (r == -1) {
@@ -406,7 +405,6 @@ int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory,
return -1;
}
extended_memory.userspace_addr = (unsigned long)(*vm_mem + exmem);
- memset((unsigned long *)extended_memory.userspace_addr, 0, extended_memory.memory_size);
r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &extended_memory);
if (r == -1) {
fprintf(stderr, "kvm_create_memory_region: %m\n");
@@ -422,7 +420,6 @@ int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory,
return -1;
}
above_4g_memory.userspace_addr = (unsigned long)(*vm_mem + 0x100000000);
- memset((unsigned long *)above_4g_memory.userspace_addr, 0, above_4g_memory.memory_size);
r = ioctl(kvm->vm_fd, KVM_SET_USER_MEMORY_REGION, &above_4g_memory);
if (r == -1) {
fprintf(stderr, "kvm_create_memory_region: %m\n");
--
1.5.2.4
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel