From e65e5f50db0a54a69cc62c2118d010244bf133ac Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Thu, 6 May 2021 12:05:43 -0400 Subject: KVM: Provide helper to get kvm dirty log Provide a helper kvm_slot_get_dirty_log() to make the function kvm_physical_sync_dirty_bitmap() clearer. We can even cache the as_id into KVMSlot when it is created, so that we don't even need to pass it down every time. Since at it, remove return value of kvm_physical_sync_dirty_bitmap() because it should never fail. Signed-off-by: Peter Xu Message-Id: <20210506160549.130416-5-peterx@redhat.com> Signed-off-by: Paolo Bonzini --- include/sysemu/kvm_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h index 1da30e1..e13075f 100644 --- a/include/sysemu/kvm_int.h +++ b/include/sysemu/kvm_int.h @@ -23,6 +23,8 @@ typedef struct KVMSlot int old_flags; /* Dirty bitmap cache for the slot */ unsigned long *dirty_bmap; + /* Cache of the address space ID */ + int as_id; } KVMSlot; typedef struct KVMMemoryListener { -- cgit v1.1