Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 325

kvm-83-270.el5_11.src.rpm

From d0fa9f935a26e9447ddd53f313f4cd5912a8ec4e Mon Sep 17 00:00:00 2001
From: Glauber Costa <glommer@redhat.com>
Date: Thu, 14 May 2009 10:30:54 -0400
Subject: [PATCH 08/16] don't use a 32-bit bit type as offset argument.

In the call path of kvm_get_dirty_pages_log_range(),
its caller kvm_get_dirty_bitmap_cb() passes the
target_phys_addr_t both as start_addr and the offset.
So, using int will make dirty tracking over 4G fail
completely.

Of course we should be using qemu types in
here, so please don't get me started on this. The whole
file is wrong already ;)

Signed-off-by: Glauber Costa <glommer@redhat.com>
Bugzilla: 501729
RH-Upstream-status: applied(qemu-kvm/master)
Message-Id: <1242311454-8791-1-git-send-email-glommer@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Dor Laor <dlaor@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Message-Id: <1242324825-8871-1-git-send-email-glommer@redhat.com>
---
 qemu/qemu-kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 18c5258..143958a 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -1164,7 +1164,7 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
 /* get kvm's dirty pages bitmap and update qemu's */
 int kvm_get_dirty_pages_log_range(unsigned long start_addr,
                                   unsigned char *bitmap,
-                                  unsigned int offset,
+                                  unsigned long offset,
                                   unsigned long mem_size)
 {
     unsigned int i, j, n=0;
-- 
1.6.3.rc4.29.g8146