From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com, jan.kiszka@web.de, Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 4/6] remove unused kvm_dirty_bitmap array
Date: Mon, 03 May 2010 19:48:23 -0300 [thread overview]
Message-ID: <20100503224905.703505696@amt.cnet> (raw)
In-Reply-To: 20100503224819.773169076@amt.cnet
[-- Attachment #1: remove-unused-dirty-bitmap --]
[-- Type: text/plain, Size: 1165 bytes --]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm-memslot/qemu-kvm.c
===================================================================
--- qemu-kvm-memslot.orig/qemu-kvm.c
+++ qemu-kvm-memslot/qemu-kvm.c
@@ -2154,7 +2154,6 @@ void kvm_set_phys_mem(target_phys_addr_t
* dirty pages logging
*/
/* FIXME: use unsigned long pointer instead of unsigned char */
-unsigned char *kvm_dirty_bitmap = NULL;
int kvm_physical_memory_set_dirty_tracking(int enable)
{
int r = 0;
@@ -2163,17 +2162,9 @@ int kvm_physical_memory_set_dirty_tracki
return 0;
if (enable) {
- if (!kvm_dirty_bitmap) {
- unsigned bitmap_size = BITMAP_SIZE(phys_ram_size);
- kvm_dirty_bitmap = qemu_malloc(bitmap_size);
- r = kvm_dirty_pages_log_enable_all(kvm_context);
- }
+ r = kvm_dirty_pages_log_enable_all(kvm_context);
} else {
- if (kvm_dirty_bitmap) {
- r = kvm_dirty_pages_log_reset(kvm_context);
- qemu_free(kvm_dirty_bitmap);
- kvm_dirty_bitmap = NULL;
- }
+ r = kvm_dirty_pages_log_reset(kvm_context);
}
return r;
}
next prev parent reply other threads:[~2010-05-03 22:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 22:48 [patch 0/6] qemu-kvm: use upstream memslot code Marcelo Tosatti
2010-05-03 22:48 ` [patch 1/6] remove alias support Marcelo Tosatti
2010-05-03 22:48 ` [patch 2/6] remove support for !KVM_CAP_SET_TSS_ADDR Marcelo Tosatti
2010-05-03 22:48 ` [patch 3/6] remove unused kvm_get_dirty_pages Marcelo Tosatti
2010-05-03 22:48 ` Marcelo Tosatti [this message]
2010-05-03 22:48 ` [patch 5/6] introduce qemu_ram_map Marcelo Tosatti
2010-05-03 22:48 ` [patch 6/6] use upstream memslot management code Marcelo Tosatti
2010-05-05 8:49 ` [patch 0/6] qemu-kvm: use upstream memslot code Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100503224905.703505696@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox