[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/26] KVM: Cache kvm slot dirty bitmap size
From: |
Paolo Bonzini |
Subject: |
[PULL 16/26] KVM: Cache kvm slot dirty bitmap size |
Date: |
Thu, 20 May 2021 10:22:47 +0200 |
From: Peter Xu <peterx@redhat.com>
Cache it too because we'll reference it more frequently in the future.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210506160549.130416-8-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
accel/kvm/kvm-all.c | 1 +
include/sysemu/kvm_int.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 0ba6d48120..df9fbf59a6 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -610,6 +610,7 @@ static void kvm_slot_init_dirty_bitmap(KVMSlot *mem)
hwaddr bitmap_size = ALIGN(mem->memory_size / qemu_real_host_page_size,
/*HOST_LONG_BITS*/ 64) / 8;
mem->dirty_bmap = g_malloc0(bitmap_size);
+ mem->dirty_bmap_size = bitmap_size;
}
/*
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
index ab09a150e1..c788452cd9 100644
--- a/include/sysemu/kvm_int.h
+++ b/include/sysemu/kvm_int.h
@@ -23,6 +23,7 @@ typedef struct KVMSlot
int old_flags;
/* Dirty bitmap cache for the slot */
unsigned long *dirty_bmap;
+ unsigned long dirty_bmap_size;
/* Cache of the address space ID */
int as_id;
/* Cache of the offset in ram address space */
--
2.31.1
- [PULL 05/26] i386/cpu: Expose AVX_VNNI instruction to guest, (continued)
- [PULL 05/26] i386/cpu: Expose AVX_VNNI instruction to guest, Paolo Bonzini, 2021/05/20
- [PULL 21/26] meson: Set implicit_include_directories to false, Paolo Bonzini, 2021/05/20
- [PULL 20/26] tests/qtest/fuzz: Fix build failure, Paolo Bonzini, 2021/05/20
- [PULL 08/26] qtest: add a QOM object for qtest, Paolo Bonzini, 2021/05/20
- [PULL 15/26] KVM: Simplify dirty log sync in kvm_set_phys_mem, Paolo Bonzini, 2021/05/20
- [PULL 19/26] KVM: Dirty ring support, Paolo Bonzini, 2021/05/20
- [PULL 09/26] KVM: do not allow setting properties at runtime, Paolo Bonzini, 2021/05/20
- [PULL 18/26] KVM: Disable manual dirty log when dirty ring enabled, Paolo Bonzini, 2021/05/20
- [PULL 06/26] meson: bump submodule to 0.57.2, Paolo Bonzini, 2021/05/20
- [PULL 22/26] remove qemu-options* from root directory, Paolo Bonzini, 2021/05/20
- [PULL 16/26] KVM: Cache kvm slot dirty bitmap size,
Paolo Bonzini <=
- [PULL 25/26] qemu-config: load modules when instantiating option groups, Paolo Bonzini, 2021/05/20
- [PULL 10/26] memory: Introduce log_sync_global() to memory listener, Paolo Bonzini, 2021/05/20
- [PULL 11/26] KVM: Use a big lock to replace per-kml slots_lock, Paolo Bonzini, 2021/05/20
- [PULL 17/26] KVM: Add dirty-ring-size property, Paolo Bonzini, 2021/05/20
- [PULL 13/26] KVM: Provide helper to get kvm dirty log, Paolo Bonzini, 2021/05/20
- [PULL 23/26] replication: move include out of root directory, Paolo Bonzini, 2021/05/20
- [PULL 26/26] scsi-generic: pass max_segments via max_iov field in BlockLimits, Paolo Bonzini, 2021/05/20
- [PULL 24/26] vl: allow not specifying size in -m when using -M memory-backend, Paolo Bonzini, 2021/05/20
- Re: [PULL 00/26] Misc patches for 2021-05-20, no-reply, 2021/05/20
- Re: [PULL 00/26] Misc patches for 2021-05-20, Peter Maydell, 2021/05/20