]> Git Repo - qemu.git/commitdiff
Provide runtime Target page information
authorDr. David Alan Gilbert <[email protected]>
Thu, 5 Nov 2015 18:10:29 +0000 (18:10 +0000)
committerJuan Quintela <[email protected]>
Tue, 10 Nov 2015 13:51:48 +0000 (14:51 +0100)
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 <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
exec.c
include/sysemu/sysemu.h

diff --git a/exec.c b/exec.c
index a0289615872ca3c026656c76f74441b30d33cbf8..4ced1a601186f64450bb9526e45d70804e510620 100644 (file)
--- 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
 
 /*
index 5cb0f050689ceab922c5d45b9535700651d5ee83..8dc2add83340cac8a90c1f6be4ffcbe8e0b58e95 100644 (file)
@@ -70,6 +70,7 @@ void qemu_system_killed(int signal, pid_t pid);
 void qemu_devices_reset(void);
 void qemu_system_reset(bool report);
 void qemu_system_guest_panicked(void);
+size_t qemu_target_page_bits(void);
 
 void qemu_add_exit_notifier(Notifier *notify);
 void qemu_remove_exit_notifier(Notifier *notify);
This page took 0.033105 seconds and 4 git commands to generate.