From: Uri Lublin <[EMAIL PROTECTED]> The function kvm_cpu_register_physical_memory() does not keep phys_offset. We need it when updating qemu-dirty-page-bitmap with kvm-dirty-page-bitmap.
Now (for VM RAM) start_addr would be the same as phys_offset. Getting kvm-dirty-page-bitmap and updating qemu-dirty-bitmap would be done correctly. Signed-off-by: Uri Lublin <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index 6c71b09..830cfb8 100644 --- a/qemu/hw/pc.c +++ b/qemu/hw/pc.c @@ -725,13 +725,15 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, int boot_device, #ifdef USE_KVM #ifdef KVM_CAP_USER_MEMORY if (kvm_allowed && kvm_qemu_check_extension(KVM_CAP_USER_MEMORY)) { + ram_addr = qemu_ram_alloc(0xa0000); + cpu_register_physical_memory(0, 0xa0000, ram_addr); + kvm_cpu_register_physical_memory(0, 0xa0000, ram_addr); + + ram_addr = qemu_ram_alloc(0x100000 - 0xa0000); // hole ram_addr = qemu_ram_alloc(ram_size - 0x100000); cpu_register_physical_memory(0x100000, ram_size - 0x100000, ram_addr); kvm_cpu_register_physical_memory(0x100000, ram_size - 0x100000, ram_addr); - ram_addr = qemu_ram_alloc(0xa0000); - cpu_register_physical_memory(0, 0xa0000, ram_addr); - kvm_cpu_register_physical_memory(0, 0xa0000, ram_addr); } else #endif #endif ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits