summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>2018-04-30 18:33:24 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2018-07-13 09:48:57 +0200
commit03133347b4452ef9b1f1456b92f5fafa467c0655 (patch)
treea39285f6c8ffc10ed38505a3eafad7d394869d0b /include/linux/kvm_host.h
parent0230cae75df62de5813a4ca39a425ba439d036da (diff)
downloadblackbird-op-linux-03133347b4452ef9b1f1456b92f5fafa467c0655.tar.gz
blackbird-op-linux-03133347b4452ef9b1f1456b92f5fafa467c0655.zip
KVM: s390: a utility function for migration
Introduce a utility function that will be used later on for storage attributes migration, and use it in kvm_main.c to replace existing code that does the same thing. Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Message-Id: <1525106005-13931-2-git-send-email-imbrenda@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 4ee7bc548a83..5f138b40e433 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -309,6 +309,13 @@ static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memsl
return ALIGN(memslot->npages, BITS_PER_LONG) / 8;
}
+static inline unsigned long *kvm_second_dirty_bitmap(struct kvm_memory_slot *memslot)
+{
+ unsigned long len = kvm_dirty_bitmap_bytes(memslot);
+
+ return memslot->dirty_bitmap + len / sizeof(*memslot->dirty_bitmap);
+}
+
struct kvm_s390_adapter_int {
u64 ind_addr;
u64 summary_addr;
OpenPOWER on IntegriCloud