summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:29 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 14:51:48 +0100
commit038629a699240326928665ea97e6e11059bbc007 (patch)
tree1ffd3431525f457557917340a0282ab3ed1651d4 /exec.c
parent2bfdd1c8a6ac22ee1f9209c247509ff0cadd2a52 (diff)
downloadqemu-038629a699240326928665ea97e6e11059bbc007.tar.gz
Provide runtime Target page information
The migration code generally is built target-independent, however there are a few places where knowing the target page size would avoid artificially moving stuff into migration/ram.c. Provide 'qemu_target_page_bits()' that returns TARGET_PAGE_BITS to other bits of code so that they can stay target-independent. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index a028961587..4ced1a6011 100644
--- a/exec.c
+++ b/exec.c
@@ -3502,6 +3502,16 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
}
return 0;
}
+
+/*
+ * Allows code that needs to deal with migration bitmaps etc to still be built
+ * target independent.
+ */
+size_t qemu_target_page_bits(void)
+{
+ return TARGET_PAGE_BITS;
+}
+
#endif
/*