From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDzlF-0007Zo-NG for qemu-devel@nongnu.org; Thu, 13 Feb 2014 12:07:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDzl7-00005t-Q6 for qemu-devel@nongnu.org; Thu, 13 Feb 2014 12:07:41 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:19974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDzl7-00005I-JN for qemu-devel@nongnu.org; Thu, 13 Feb 2014 12:07:33 -0500 Message-ID: <52FCFBB3.5000401@inria.fr> Date: Thu, 13 Feb 2014 18:06:59 +0100 From: Vincent KHERBACHE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Get the dirty bitmap of a whole VM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, I'm trying to calculate the dirty bytes rate of a VM by traveling the corresponding memory dirty bitmaps. I get a bitmap from KVM kernel space using the following ioctl call : kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d); Also, I'm getting the bitmap for each memory slot inside the KVMState object, but I obtain strange results.. I reused some code from the 'kvm_physical_sync_dirty_bitmap' function but I wonder if I should really use each available memory slot ? or if there is a way to obtain the whole 'MemoryRegionSection' of a VM ? For instance, there is roughly what I do : /******************************/ KVMState *s = kvm_state; KVMDirtyLog d; for (int i=0; i <=; i++) { if (&s->slots[i]->memory_size > 0) { d.slot = &s->slots[i]->slot; kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d); } } /******************************/ Any help/advice would be welcome. Thanks, -- Vincent KHERBACHE