qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Get the dirty bitmap of a whole VM


From: Vincent KHERBACHE
Subject: [Qemu-devel] Get the dirty bitmap of a whole VM
Date: Thu, 13 Feb 2014 18:06:59 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]